Joined: 30 Nov 2013 Posts: 574 Location: The Universe
Actually, this is a silly request. Most Assembler programmers would just read the PDS directory directly, not mess around with getting a directory listing and then checking the listing.
DIR0100 GET DIR
DIR0200 CLC =FL8'-1',PDS2NAME
... Process the directory entry
DIR0300 IC 4,PDS2INDC
DIR DCB DSORG=PS,MACRF=GL,DDNAME=...,EODAD=EOF,
The IHAPDS macro is in SYS1.MODGEN, and has all the standard symbols for load module entries.
In the code, reg 3 points to the current directory entry, and register 5 points to the last used data byte in the directory block. The code starting at DIR0300 computes the length of the directory entry. The 5 low order bits in PDS2INDC define the number of 2 byte elements of user data in the directory entry. LA 4,(PDS2USRD-PDS2)(4,4) takes this value, multiplies it by 2, and adds the length of the member name and TTRC data areas to get the complete length of the directory entry.
LOOP GET INPUT
In this snippet, the DCB used to read the input data set is defined as using “locate” mode I/O, wheret the GET macro returns a record address to your program in reg 1. This scheme works well only if the input data is more or less fixed.
Examine the data more directly.
LOOP GET INPUT
As in the first snippet, the GET macro returns a record address in reg 1. This scheme is more useful if the record contents are more vaiable.Jack, before you go any further: