Peter Relson wrote on 07/14/2006 07:27:21 AM:

> Here's an example from the TCB formatter, for the 3 bytes at offset
x'AD'.
> I'm not sure if it conforms to Bob Wright's recommendations, as it is
quite
> old. When in doubt, follow Bob's advice!
>
> BLSQMFLD NAME=TCBNDSP,OFF=X'00AD',LEN=3,VIEW=X'8280',DECODE
>
> ,...
>
> TCBNDSP  BLSQMDEF CBLEN=X'0003',MAINTLV=HBB5520,PREFIX=8,              X
>                HEADER=TCBNDSP,OFFSETS=NOPRINT
> * -----NDSP1 BITS ------------------------------
>          BLSQMFLD SHDR=NDSP1HD,VIEW=X'FF08'
>          BLSQMFLD SHDR=DARTN,VIEW=X'8008',NEWLINE
>   <snip>
> * -----NDSP2 BITS ------------------------------
>          BLSQMFLD SHDR=NDSP2HD,VIEW=X'FC04'
>          BLSQMFLD SHDR=ABD,VIEW=X'8004',NEWLINE
>   <snip>

The only recommendations that I'd make if a similar model were being
composed today would be that it make maximum use of the mapping macro for
the data area.  That wasn't done with the model for the TCB, and there's
little rationale for going back and changing that since the TCB is
extremely compatible from release to release at the object code level.
However, you just have to know that this code knows about all of the
NDSP1-NDSP3 flag field bits.  A scan of source code won't easily tell you.

The example is helpful, however, to illustrate a number of things about
models.

o  VIEW=X'8280' in the initial model allows this one model to serve
multiple formatting purposes.  SUMMARY KEYFIELD can use it with one set of
view bits turned on that do not cause flag bit decoding to occur, and
SUMMARY FORMAT can use it to cause detailed formatting of all fields.  In
the former case, SUMMARY KEYFIELD need only avoid turning on any of the
bits on in the view mask that cause the three flag fields to be called out.
The TCB model is very popular and uses an elaborate combination of view
bits in its BLSQMFLD VIEW masks to serve all of the requirements placed on
it.

o  VIEW=X'FF08' and VIEW=X'FC04' allow a comment to be put out pertaining
to a specific flag byte having bits with related meaning on in it.
Subheaders are selected based on at least one bit remaining on after ANDing
with the flag byte itself.

Bob Wright - MVS Service Aids

----------------------------------------------------------------------
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

Reply via email to