Robert Wright wrote: > > 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.
I tried this with one of my bitfields. I had looked at DECODE before, but wasn't able to get it work. An example is really the only way to show this kind of thing. In particular, I don't see how the description of the VIEW parm matches in any way what is shown above. But, with Bob's note below, I'm able to figure out what I need for my purposes. I still had to use OFF= though. If you use only the macro name (e.g. TCBNDSP), then you get a duplicate definition since that same name has to be used in the corresponding BLSQMDEF that describes the bits. > > 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 -- Don Poitras - zSeries R & D - SAS Institute Inc. - SAS Campus Drive mailto:[EMAIL PROTECTED] (919)531-5637 Fax:677-4444 Cary, NC 27513 ---------------------------------------------------------------------- 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

