On Thu, 2007-07-19 at 20:34 -0500, Ed Gould wrote:
> We had a excellent COBOL programmer look at the layout [SMF rty 30]
> and after a few questions he said he didn't even want to try it. He
> wasn't even sure it could be done.
Sure it can!
You need to define the record headers and the associated sections as
separate COBOL level-1 structures:
LINKAGE SECTION.
****
**** SMF type 30 header.
****
01 SMFREC-30.
05 SMF30FLG PIC X.
05 SMF30RTY PIC X.
05 SMF30TME COMP PIC S9(8).
05 SMF30DTE COMP-3 PIC S9(7).
05 SMF30SID PIC X(4).
etc
****
**** SMF type 30 subsystem section, always present.
****
01 SMFREC-30-SUBSYSTEM.
05 SMF30TYP COMP PIC S9(4).
05 SMF30RS1 PIC X(2).
05 SMF30RVN PIC X(2).
etc
****
**** SMF type 30 identification section, always present.
****
01 SMFREC-30-IDENTIFICATION.
05 SMF30JBN PIC X(8).
05 SMF30PGM PIC X(8).
05 SMF30STM PIC X(8).
etc
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 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.
Easy Margie. A little tedious, but straightforward enough.
--
David Andrews
A. Duda and Sons, Inc.
[EMAIL PROTECTED]
----------------------------------------------------------------------
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