On Monday, November 18, 2019, 05:56:09 AM PST, scott Ford
<[email protected]> wrote:
> My chief complaint is samples.
> I spend a lot of time digging for examples.
> Working examples which I can refer to and understand
> (prototype) before I start writing code.
CBTTAPE.ORG has tons of real world code. There is probably a variation on your
request there but you will need to think creatively to find it. Since you
wanted an exit that issues a WTO then look at IEFACTRT. This implementation
will not work in every exit.
Samples need to be generic with very little risk. A sample WTO in an exit could
easily be misconstrued or unfit for your intended use.
> When to use the execute form of the macro vs list,
MF= is common and rarely deviates from the accepted standard. MF=(E,label)
creates the executable code and belongs in your code where you want to execute
the functionality. Think of it as the instruction.
MF=L is the problem. Think of this as a DC instruction to reserve storage.
Using MF=L in your CSECT makes your program non-reentrant. Using MF=L in your
workarea DSECT makes your program reentrant but loses the constant initializer
(initializes with X'00'). To be reentrant, it must occur in your CSECT and
workarea DSECT. You must copy from the CSECT to the workarea DSECT and make
sure the alignment is correct. You must also ensure the pointers are correct.
Some programs skip the copy from CSECT to DSECT but they are at risk.
Jon.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN