Ian_Hill

CA Tuesday Tip: (CA IDMS) UNLOAD area dependencies

Discussion created by Ian_Hill Employee on Feb 12, 2013
Latest reply on Feb 27, 2013 by Eddy_G
CA IDMS Tuesday Tip by Ian Hill, Principal Support Engineer for February 12, 2013.

In the spirit of last week's query, here's another one. A bit longer, but no less interesting. It generates a result set which represents the area dependencies for an unload/reload job. Again, you will need to have an SQL schema describing your dictionary (in this case, APPLDICT).

Just replace EMPSCHM (and its version number, 100 here) and EMP-DEMO-REGION (twice each) with the names of the schema and area you want to unload.

In the output, a column with the RECORD value of SR7 represents a cross-area link established by a system-owned index.

In regard to the posting problem from last week's query, there are no repeated blanks inside quotes anywhere so the problem should not arise.

SET SESSION CURRENT SCHEMA APPLDICT;
SELECT A1.SA_NAM_018 AS AREA, RS1.RSYN_NAME_079 AS RECORD, 'OWNER ' AS ROLE,
SOR1.SET_NAM_046 AS SET, RS2.RSYN_NAME_079 AS "RELATED RECORD",
A2.SA_NAM_018 AS "DEPENDENT AREA"
FROM "SA-018" A1, "SAM-056" AR1, "SRCD-113" R1, "RCDSYN-079" RS1,
"SOR-046" SOR1, "SMR-052" SMR1, "SRCD-113" R2, "RCDSYN-079" RS2,
"SAM-056" AR2, "SA-018" A2
WHERE A1.S_NAM_018='EMPSCHM ' AND A1.S_SER_018=100
AND A1.SA_NAM_018='EMP-DEMO-REGION'
AND "SA-SAM".A1.AR1 AND "SRCD-SAM".R1.AR1 AND "RCDSYN-SRCD".RS1.R1
AND "SRCD-SOR".R1.SOR1 AND "SOR-SMR".SOR1.SMR1 AND "SRCD-SMR".R2.SMR1
AND "RCDSYN-SRCD".RS2.R2 AND "SRCD-SAM".R2.AR2 AND "SA-SAM".A2.AR2
AND A2.SA_NAM_018 <> A1.SA_NAM_018
UNION
SELECT A1.SA_NAM_018 AS AREA, RS1.RSYN_NAME_079 AS RECORD, 'MEMBER' AS ROLE,
SOR1.SET_NAM_046 AS SET, RS2.RSYN_NAME_079 AS "RELATED RECORD",
A2.SA_NAM_018 AS "DEPENDENT AREA"
FROM "SA-018" A1, "SAM-056" AR1, "SRCD-113" R1, "RCDSYN-079" RS1,
"SMR-052" SMR1, "SOR-046" SOR1, "SRCD-113" R2, "RCDSYN-079" RS2,
"SAM-056" AR2, "SA-018" A2
WHERE A1.S_NAM_018='EMPSCHM ' AND A1.S_SER_018=100
AND A1.SA_NAM_018='EMP-DEMO-REGION'
AND "SA-SAM".A1.AR1 AND "SRCD-SAM".R1.AR1 AND "RCDSYN-SRCD".RS1.R1
AND "SRCD-SMR".R1.SMR1 AND "SOR-SMR".SOR1.SMR1 AND "SRCD-SOR".R2.SOR1
AND "RCDSYN-SRCD".RS2.R2 AND "SRCD-SAM".R2.AR2 AND "SA-SAM".A2.AR2
AND A2.SA_NAM_018 <> A1.SA_NAM_018;

Outcomes