Excellent example, David. I would make one change: > > You need some pointers to address those records and sections. (There > are some hokey redefines so that you can do pointer arithmetic.) > > 01 SMF30-ID-ADDRVAL COMP-5 PIC S9(8). <***===--- > 01 SMF30-ID-ADDRPTR REDEFINES SMF30-ID-ADDRVAL POINTER. > etc > > You'll have to set those pointers. > > COMPUTE SMF30-ID-ADDRVAL = > [address of SMF record, perhaps in heap storage] + SMF30IOF - 4. > SET ADDRESS OF SMFREC-30-IDENTIFICATION TO > SMF30-ID-ADDRPTR.
COMP-5 tells the compiler that the field is a fullword (or halfword, or doubleword, depending on the PIC) and it will not try to play games to have the value match the PIC clause. In something as compute-intensive as SMF triplets, every little bit helps. Later, Ray -- M. Ray Mullins Roseville, CA, USA http://www.catherdersoftware.com/ http://www.mrmullins.big-bear-city.ca.us/ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html