Page 2 of 2

Re: Need help with BPXWDYN

PostPosted: Mon Apr 04, 2022 11:12 pm
by willy jensen
I think that BPXWDYN is ok documented, though perhaps not in the manual you would expect if you are using assembler or C. And it is much easier to use than DYNALLLOC / SVC 99.
But that is just my personal opinion.

Re: Need help with BPXWDYN

PostPosted: Tue Apr 05, 2022 7:40 am
by BigLenny
Is there ever a time when you wouldn't want to use BPXWDYN and should use SVC 99 instead? Are they actually different? In the manual it says BPXWDYN is a text interface to a subset of SVC 99, so it sounds like it's just an easier to use version, but maybe it doesn't have all of the same capabilities? All I know is the example for SVC 99 in the manual looks like hieroglyphics to me haha

Re: Need help with BPXWDYN

PostPosted: Tue Apr 05, 2022 8:50 pm
by steve-myers
Another topic that was raised is the depiction of a quote (') character in an Assembler DC statement. This statement defines a "normal" character string -
STRING1  DC    C'HELLO WORLD'
The HELLO WORLD is the text; it is delimited by a single quote character. Now what do you do if you need a quote character in the string? The 48 or 60 bit character definition in early System/360, much less its BCD based ancestors did not have the double quote ("). The convention was to use two consecutive single quote characters to define a single quote character in the assembled string -
STRING2  DC    C'''HELLO WORLD'''
to generate 'HELLO WORLD'. The first triple ' defines the start of the character string followed by a single ' in the text. The second triple ' defines another single quote in the string and the end of the string. This convention was followed for other special characters, notably the & character.

This convention was followed through in other contexts like JCL :
// EXEC PGM=XYZ,PARM='HELLO WORLD'
// EXEC PGM=XYZ,PARM='''HELLO WORLD'''

Re: Need help with BPXWDYN

PostPosted: Tue Apr 05, 2022 8:56 pm
by willy jensen
Is there ever a time when you wouldn't want to use BPXWDYN and should use SVC 99 instead

There are features in SVC 99 not available in BPXWDYN, but nothing that I have needed for a very long time. I would look very very hard at BPXWDYN before again venturing into SVC 99 land.

Re: Need help with BPXWDYN

PostPosted: Tue Apr 05, 2022 10:04 pm
by steve-myers
Getting useful return codes out of BPXWDYN in the event of a problem in Assembler is not so easy, but I'm very oriented to SVC 99, since there are two different programs to generate useful messages following SVC 99 errors. Look at some of my TSO commands, especially the command in "file" 966. Most of the technology to simplify SVC 99 usage I developed in the 1970s and early 1980s and continue to use unchanged in response to problems I had early on.

DYNRELOC and the data areas it relocates was a response to unexpected S0C4s in SVC 99. Many times you want to allocate a fixed data set name, and but you can't define and use a DALDSNAM key in reentrant program text: SVC 99 will 0C4 ABEND trying to use that text. Instead, with DYNRELOC you define SVC 99 data areas, move the initial skeleton to the work area, and use DYNRELOC to convert offset definitions to true addresses, and touch up other variable data in the work area to match the actual requirements of the allocation, and then SVC 99.