On Mon, 2010-04-19 at 09:06 -0400, McKown, John wrote: > MOVE LARGEST-INPUT-RECORD (UNSTRING-OFFSET: > LENGTH OF SMF30ID) > TO SMF30ID
I dig now; you're moving the segments to a separate segment-defining record in order to gain field addressability. Using pointers (and redefines) I'd address that ID segment directly: 01 SMF30-ADDRVAL COMP PIC 9(8). 01 SMF30-ADDRPTR REDEFINES SMF30-ADDRVAL POINTER. 01 SMF30-ID-ADDRVAL COMP PIC 9(8). 01 SMF30-ID-ADDRPTR REDEFINES SMF30-ID-ADDRVAL POINTER. IF (SMF30ION = 1) COMPUTE SMF30-ID-ADDRVAL = SMF30-ADDRVAL + SMF30IOF - 4. SET ADDRESS OF SMFREC-30-IDENTIFICATION TO SMF30-ID-ADDRPTR. I kinda like my way better, but as others have pointed out it isn't all that future-proof. Guess I should fix that if I ever have to crack that code open again. -- David Andrews A. Duda and Sons, Inc. david.andr...@duda.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html