On Thu, 12 Oct 2023 at 12:36, Seymour J Metz <sme...@gmu.edu> wrote:

> You retrieve the CB storage from IPCS, use SUBSTR to extract the fields
> you want, use c2x() to make binary data human readable and use standard
> REXX abutment and concatenation to format the data with labels.
>
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf
> of Joseph Reichman <reichman...@gmail.com>
>
> Seymour I looked thru the manuals to create an actual control block or
> structure think you need assembler just give me a hint how I would go abou
> this task In  Rexx
>

Parse is the REXXy way to do this. Thing is, REXX has no notion of
structures or DSECTs or whatever you want to call them. There is no way to
statically define the layout of a multi-field <thing> and then have REXX
understand how to deal with the fields. So the usual approach is to fetch
the data into a variable (using IPCS EVAL or REXX Storage() ), and then use
Parse Var with a list of the fields and offsets. This is a pain in many
ways - not least becaues the offsets are in 1-origin decimal, and almost
always what you have to work with is 0-origin hex - but it's quite easy to
write a routine (in REXX, probably) to generate the Parse statements from
assembler source or ADATA, or at least the list of names and offsets. Or
for something small, just do it manually. Then, since REXX doesn't have
typed variables, you have to convert some of the fields to a type you can
work with usefully in REXX. So e.g. if you have a counter in an assembler
DS F field, then you probably want to convert it into a REXX variable using
C2D() so you can use it directly as e.g. a loop counter.

All this has nothing to do with those BLSQ macros. That's a whole different
topic.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to