I am trying to develop a technique to force a DSECT (describing some
private control block of mine) to stay synchronized with the
inline-constant and space-reserving versions of the same control block.
For example, for DSECT ABC with field definitions of
ABCID DS CL4 Eyecatcher
ABCLEN DS AL2 Length of ABC
ABCLVL DS AL2 ABC modification level
ABCDATA DS F Some binary data
ABCL EQU (*-ABCID)
I would like to be able to generate in-line constants:
label1 DS 0F
DC CL4'EYEC'
DC AL2(ABCL)
DC AL2(1)
DC F'0'
ABCL EQU (*-label1)
and space:
label2 DS CL(ABCL)
The DSDC macro generates a labeled DS statements or unlabeled DC
statements depending on &TYPE; its format is, for example:
ABCEYE DSDC CL4,C'ABCD','EYECATCHER',&TYPE
ABCLEN DSDC AL2,(ABCBLKLN),'LENGTH OF THIS CONTROL BLOCK',&TYPE
Although I started work on this with a macro I call DSDC, I was
wondering if I'm reinventing the wheel. Is there a model for this out
there?
Any suggestions are welcome.
Gary Weinhold
Data Kinetics, Ltd.