ci-server-engineer/.claude/skills/system-management/tasks/load-remove-records.md
cliu 1c3558c37c Complete phase 1 and build the CI-Eng-Sample project
Add verified system-management tasks (item read/write, quick load
records, history load, monitoring processes, consistency check, tuning
checks), the importable CI-Eng-Sample project with load/remove scripts,
the unlicensed 1-hour shutdown note, and the sample-project re-test
rule. Close ISS-002/003/004 and log ISS-005..007.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:01:33 +10:00

3.7 KiB
Raw Blame History

task version source status
Load and remove dataset records with dssqld (quick load) R1.03 IM 36K10J10-01EN §2.9.2, §5.6; IM 36K10L45-01EN §9.10–9.11; practiced with CI-Eng-Sample 2026-09-30 verified

Load and remove dataset records (dssqld quick load)

Writes to the CI Server database. Needs CI Server running. Follow the user's chosen way of working: in prepare only mode, write the .qli files and a .cmd script for the user to run. Test on a test system first.

Quick load file format (.qli)

@LANGUAGE
ENGLISH

@VERSION
1.03.00

! comment
@FIELDS
NAME,SECTION_PATH,SECTION_NAME,DESCRIPTION

@SECTION_DF
"CI-Eng-Sample","","CI-Eng-Sample","CI-Eng-Sample project"
"CI-Eng-Sample.TANK1","CI-Eng-Sample","TANK1","Sample tank 1"
  • @FIELDS lists the fields in the records that follow; the next @<DATASET> line names the dataset. A file can hold several @FIELDS / @<DATASET> blocks.
  • One record per line, strings in double quotes, numbers bare, comma-separated. End a line with \ to continue the record on the next line (long @FIELDS lists can also wrap).
  • Only the listed fields are set; the rest take their defaults. Required fields are marked "Is required on import" in the data dictionary (dssqld -f -l dict.lst).
  • Easiest way to get a correct template: export an existing dataset without -c (dssqld -e template.qli -d <DATASET>); the output is already in this format.

Load (insert)

dssqld -i <file>.qli -l <file>.qlo

Summary per dataset: Recognized, Imported, Exists (already present, left unchanged), Errors. Check Errors is 0; the .qlo listing holds the same result.

Update (modify)

dssqld -m <file>.qli -l <file>.qlo

Changes the listed fields of existing records (the key field plus the fields to change). Summary: Modified, Not found, Errors. Verified by setting a storage group's STOP_TIME.

Remove (delete)

dssqld -r <file>.qli -l <file>.qlo

The file only needs the key field (@FIELDS NAME). Summary: Removed, Not found, Errors.

Storage groups (HIS_GROUP_DF) cannot be deleted while they have an active storage unit (HIS-E-GROUPHASUNT, Group still has an active unit connected). First remove the items from the group (ITEM_HIS_DF), then set the group's STOP_TIME a minute ahead with -m, wait until it has passed, then delete the group. Deleting a group deletes its history.

Order matters

  • Load parents before children: sections (parent before child) → template items → classes (compiled) → objects → other items (IM 36K10J10 §5.6) → storage groups → items in storage groups (ITEM_HIS_DF, record name <group>:<item>).
  • Remove in reverse: items from storage groups, storage groups (stop first), items, sections (children before parents).
  • A new storage group stores nothing until CI Server is restarted.
  • Linking items to a group straight after creating it failed once with 2 errors; a 5 s pause in between has been reliable (knowledge/issues.md ISS-005).
  • Put each step in a .cmd script so the order is repeatable. Run scripts by full path (cmd /c "<path>\load.cmd"); a bare name may not be found from the current folder.

Verified example

examples/CI-Eng-Sample/ (01_section_df.qli, 02_item_df.qli, load.cmd, remove.cmd): sections, items, a storage group and its item links loaded, removed and loaded again with 0 errors. remove.cmd shows how to set the storage group stop time from a script (PowerShell writes the .qli, then Start-Sleep; timeout fails when there is no console). Items need only NAME and ITEM_REP (Real, Integer, Boolean, String); the sample also sets DESCRIPTION, VALUE_FORMAT, limits and scale.