I could be wrong but...

The OP's question was in relation to the IMS DL/I test program (DFSDDLT0).

https://www.ibm.com/docs/en/ims/15.2.0?topic=reference-dli-test-program-dfsddlt0

The OP has a database structure with a root (PARTROOT) and a child of the root 
(STOCKSTAT). There may be other segments in the structure, e.g. other children 
of the root or children of the STOCKSTAT. We don't know yet.

The OP wants to print a root and all of STOCKSTAT children, the next root and 
its children, etc.


The problem here is that DLT0 is not a programming language. There are no 
looping structures, not even a GO TO. The OP's example is that you can tell it 
to do an IMS call (in this case GN [get next]), and we can tell it to repeat 
that call 9999 times. We can tell DLT0 to stop when it hits particular status 
codes. But what we can't do is, for example, a sequence of different IMS calls:

1. Get next root.
2. Get next child within parent, until no more found
3. Go to #1

If there was a way in IMS to code a single call that would return EITHER the 
root OR the child, we could have DLT0 do that. But there isn't. The segment 
returned is the last SSA in the call. If we put both the root and the child as 
SSAs, then we're only going to get the child.

We could do a path call, but then you'd get the root and the child returned for 
every call.


This is why I asked about sensegs. The Program Specification Block (PSB) lists 
which segments the application is sensitive to. If the PSB the OP is using only 
lists these two desired segments, then you just need:

L   9999 GN

because it would only see the root and desired child segment.


The easiest solution using DLT0 is to create or find a PSB that only has 
SENSEGs for these two segments.


If I was doing it, I'd instead use one of:

- File Manager/IMS
- CA-Easytrieve with the IMS Option
- REXX (did you know you can make IMS calls from REXX??)




-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Schmitt, Michael
Sent: Monday, June 9, 2025 2:22 PM
To: [email protected]
Subject: Re: DDLT0

Sorry, meant SENsegs.

Offhand, if there are more sensegs this may be a challenge.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Schmitt, Michael
Sent: Monday, June 9, 2025 2:17 PM
To: [email protected]
Subject: Re: DDLT0

Are PARTROOT and STOCKSTAT the only segsegs in the PSB for this PCB?

Because, if they are then you don't need a segment name at all.

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Pierre Fichaud
Sent: Monday, June 9, 2025 2:13 PM
To: [email protected]
Subject: DDLT0

To All,
     I'm trying to use more than 1 unqualified SSA.
     The control cards are :

S 1 1 1 1 1       00001                                                  .
L   9999 GN    PARTROOT  STOKSTAT

     All I get are PARTROOT segments.
    I was hoping to get a P{ARTROOT followed by its STOKSTAT children, another 
PARTROOT and its children, etc.
    I've searched for documentation but found nothing for my case.
    The documentation on DDLT0 is scarce and what exists is weak.
Thanks in advance, Pierre.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to