If you know the name of the index set and you want to look up what the member record of this index set is ('the Record being indexed') then I would do that in OLQ as follows:
Element RSYN-NAME-079 will then show you the name of the record you're looking for.
Kind regards, Johan.
Original Message:
Sent: Apr 04, 2025 10:42 AM
From: Michael Cairns
Subject: Trawling through dictionary structures
Thanks very much for the pointers and the welcome Tommy & Johan.
With your help I've made some progress, but this raises more questions I hope you're able to provide some pointers for. So far, I've done two different things to try and find the information I'm after. First, based on your suggested walk-through of the IDD records (DDLDML), I now have a COBOL program that when given the name of an AREA (and a SubSchema) returns me a list of Records and Sets. Outline of the code is:
Locate the AREA within SA-018
Use SA-SAM to locate the Records within this AREA (SAM-056), loop through these
For each Record access it via Calc in SSR-032
For each SSR-032 locate Sets using SSR-SSOR
I have to apply some tests: if a Record has an SSR-SSOR (SSOR-034) but not an SSR-SSMR (SSMR-068), don't use it. And if it does have an SSR-SSMR, only use this Record if the SET-NAM-068 is NE to CALC. These tests may be unique to my use case, which is to build a valid SubSchema from the resulting Areas, Records and Sets.
On a second separate front, I have another COBOL program that uses the DDLCAT to traverse the AREA-1026 & SYMBOL-1048 records retrieving a list of all AREAs in the Schema together with Symbols where an AREA has them (as far as my limited knowledge is able to tell). This was developed in an attempt to see if I could use the DDLCAT records to locate the Indexes that were associated with Records discovered in an AREA.
So to my questions now:
To Johan, from your suggestion, I am able to locate Indexes via their naming convention within the SOR-046 records (I use DMLO for this), but I am struggling to find a way to link these back to the Records that they index. For our installation, I can see the naming convention makes this connection between the Index name and the Record being indexed, but I see no database links that I could reliably follow in program logic where the naming convention might not be 100% consistent. Here's an example SOR-046 DMLO output anonymised below - here the associated Record would be AANNNN and this is its second Index (X2):
04/04/25........................RECORD : SOR-046...........02 SET-NAM-046..............................A AANNNN-X2 02 SET-ORD-046..............................H +00001 02 NXT-DBK-046..............................H +00002 02 PRI-DBK-046..............................H +00003 02 SOR-ID-046...............................H +00007 02 DELETION-046.............................H +00000 02 ORD-046..................................H +00000 02 SORT-046.................................H +00000 02 S-NAME-046...............................G 03 S-NAM-046...............................A SCHEMA1 03 S-SER-046...............................H +00500 02 SET-MODE-046.............................H +00021 02 INDEX-MEMBERS-046........................H +00000 02 INDEX-DISP-046...........................H +00000 02 SYMBOL-INDEX-046.........................A S-AANNNN-X2 02 PAGE-OFFSET-PERCENT-046..................H -00001 02 PAGE-COUNT-PERCENT-046...................H -00001 02 PAGE-OFFSET-046..........................F -0000000001 02 PAGE-COUNT-046...........................F -0000000001 02 SUBAREA-046..............................A SA-AANNNN-X202 SA-NAM-046...............................A AXANNNN 02 INDEXID-046..............................H +00000 02 SET-TYPE-046.............................H +00000 02 PK-NAME-046..............................A 02 FILLER#010...............................A
I can see the link back to the AREA name in SA-NAM-046, but apart from the naming convention I don't see how to link this with a record derived from my walk through the SAM-056 set.
And to Tommy, from the DDLCAT processing in my second piece of COBOL I am able to obtain the names of Index AREA and SubArea synonyms, which was one of my original goals. The question is though, can I combine queries against both DDLDML and DDLCAT into a single program? Was this what you eluded to with a reference to a 'second run-unit' above?
Thanks again gents, wishing everyone a lovely weekend coming up. Cheers - Mike
Original Message:
Sent: Mar 31, 2025 08:50 AM
From: JOHAN NEVENS
Subject: Trawling through dictionary structures
Hi Mike,
Welcome to the IDMS family!
To navigate from an area to the records and to look up the sets of those records we use the same paths as Tommy already described. Once you are there (record SOR-046) you can find the name of the index area you are also looking for in the element SA-NAM-046. This element is only filled in when you are dealing with a system-owned index set.
Kind regards, Johan.
Original Message:
Sent: Mar 21, 2025 06:22 AM
From: Michael Cairns
Subject: Trawling through dictionary structures
Dear all,
It's been about 5 months since I started my journey into IDMS land, and oh have I learned a lot, and mostly I've learned how much more there is to learn also!
I now have an interesting task that I would appreciate any feedback on from the real experts here.
I have a COBOL program that reads the IDMSNWKA database processing several record types to produce a list of AREAs, RECORDs and SETs. What I am trying to do is alter/extend this program to retrieve a list of RECORDs, SETs, INDEX AREAs and SUBAREAs when given a starting point of a single AREA. I don't know if this is possible, but I've been able to hack my original program to simply return a list or RECORDs and SETs associated with an AREA. Given what the program already did, this was relatively trivial - but I would like to do it more efficiently, as well as retrieving as much information from the system catalog as possible at the same time.
Here's a rough outline of how my current program does what it does:
For starters, these are the records used:
S-010
SOR-046
SMR-052
SAM-056
RCDSYN-079
SRCD-113
We start with checking that the SCHEMA matches what we've been asked for from S-010 and then walk the set of S-SRCD processing all records.
For each record in this set we obtain an Owner from RCDSYN-SRCD. From that Owner we then:
Obtain the list of its AREAs from SRCD-SAM.
Get any sets it owns from SRCD-SOR, and for these get their members from SOR-SMR and associated AREAs via their owner in SRCD-SMR.
Get a list of its members from SOR-SMR.
And member sets from SRCD-SMR via owners in either SOR-SMR or SRCD-SOR.
The logic is convoluted and confusing to a noob such as me, and I admit struggling to understand how this is working. I may also have not represented the logic correctly here, apologies if that's the case.
So, my question(s) really could be summed up as:
Given an AREA, which IDD catalog records and sets do I need to traverse to discover the RECORDs and SETs within that AREA. And then, can I get from the AREA to a list of Index AREA's for these? And finally, is there a record linking SUBAREA's with AREA's within the IDD catalog?
Thanks all for taking a look! Happy Friday!
Cheers - Mike, noob IDMS systems programmer.