Paul Gilmartin wrote:
>>Oh, look also for magic word: BPXWDYN.
>I'm very familiar with BPXWDYN in Rexx. And I know that it is (mostly)
>compatible with the standard CALL interface: I've (less often) used TSO CALL
>*(BPXWDYN) ... But I've also read that for some functions it has an
>additional requirement, perhaps a particular content of R0 which is not
>supplied by some languages, so I raised the question about COBOL.
Hmmm, about R0, I think, if I have time in future, I will generate an ASM
listing just to see where R0 fits in a COBOL pgm with dynalloc.
I posted this working sample in Feb 2008 on IBM-MAIN. (A whole long time after
your comment on Jan 2007: "BPXWDYN might be callable directly from COBOL with
no need for Rexx" :-D )
This sample explains what I said about 'behind the scenes'. Somewhat clumsy,
but I occasionally need to create dataset names on the fly. (Usually splitting
input into several unique output. With big input, REXX tends to be somewhat
slow [1] and expensive in CPU.)
In COBOL, Rexx, C, etc, you pass a string as an argument when calling BPXWDYN.
WORKING-STORAGE SECTION.
01 SUB-PGM PIC X(8) VALUE 'BPXWDYN '.
01 ALLOC-INVOER-CMD.
05 FILLER PIC X(50) VALUE
' ALLOC DD(FILEIN) DSN(COBOL.DYNALLOC) OLD '.
05 FILLER PIC X(50) VALUE
' '.
01 COMMAND-STRING.
05 C-S-LEN PIC S9(4) BINARY VALUE +100.
05 C-S-DATA.
07 FILLER PIC X(100).
MOVE ALLOC-INVOER-CMD TO C-S-DATA.
CALL SUB-PGM USING COMMAND-STRING.
Groete / Greetings
Elardus Engelbrecht
[1] - No Compiled REXX. Sigh... :-(
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN