On 2017-08-27, at 13:21, Dave Jones wrote: >>> > Callable Services Library is an API designed by CMS development way back > when that allows routines, usually written in assembler, to be called > from a variety of compiled (C, PL/I, Assembler, etc.) and interpretive > (Rexx, EXEC2) languages using the same interface. Quite a Good Thing to > have, imho. >>> >> Self training. Looking at an example (one of very few for Rexx): >> >> https://www.ibm.com/support/knowledgecenter/SSB27U_6.2.0/com.ibm.zvm.v620.dmsp1/hcsp1c1007.htm#wq9 >> >> call apiload 'VMREXOVM' >> /* Change the working directory */ >> pathname = '/home/myfiles' >> plength = length(pathname) >> address OPENVM >> 'BPX1CHD plength pathname return_value, >> return_code reason_code' >> >> What's that pesky comma doing there? Does it mean: >> 'BPX1CHD plength pathname return_value' , >> 'return_code reason_code' >> or even: >> 'BPX1CHD plength pathname return_value return_code reason_code' >> or: >> 'BPX1CHD plength pathname return_value, return_code reason_code' > OK, this is something different than the CSL; this bit of Rexx code is > invoking the OpenVM routine BPX1CHD, using the Rexx OpenVM subcom > interface. Following the Rexx syntax requirements, the "," is there to > tell Rexx to continue the statement on the next line, so your second > guess is the correct one. > I'm pretty good with Rexx. So I'll claim that my first guess, with the explicit continuation, is equivalent and also correct.
>> RCF material? >> Well, I think so. How to submit an RCF? Just follow a feedback link on that web page? Sometimes those are more about site operation than content. >> Elsewhere I see: >> >> https://www.ibm.com/support/knowledgecenter/SSB27U_6.2.0/com.ibm.zvm.v620.dmsp1/chd.htm?view=embed#chd >> pathname_length >> (input,INT,4) is a variable for specifying the length of the pathname >> parameter. >> ... so I'd expect >> plength = d2c( length( pathname ), 4 ) >> what don't I understand? > What you are looking at there in the document is how to call the BPX1CHD > OpenVM routine using the CSL for OpenVM.The syntax description is > language independent, and "(input,INT,4)" means: > 1) this is an input parameter > 2) it's an integer > 3) it's four bytes long (int 32) > > The example show how to specify those parameters in Assembler; if you > were coding the example in PL/I, you would use the rules for PL/I to > specify the parameters and call the routine. > If this were the similar SYSCALL environment in z/OS, I'd expect SYSCALL to be aware of the syntax of each supported command: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb600/gcw.htm ... and reformat arguments as necessarn, for example the effect of d2c( ..., 4 ) for integer arguments? Does OPENVM do likewise? It seems to be a lower level interface, else it could calculate plength itself, as SYSCALL does, rather than requiring the programmer to supply it. A lower level desigh would have the drawback of requiring the programmer to code such conversions explicitly but the benefit of automatically supporting any new CSL commands with no need to accommodate them with new code in the OPENVM source. In my imaginary RCF, I'll ask that: o The example be *tested* before publication. Obviously it wasn't o The example be augmented to: trace R /* *** Show results of each command. *** */ call apiload 'VMREXOVM' /* Change the working directory */ pathname = '/home/myfiles' plength = length(pathname) address OPENVM 'BPX1CHD plength pathname return_value, return_code reason_code' say return_value /* *** Show what happened. *** */ I'm trying (not) to imagine the code for ADDRESS OPENVM 'BPX1SPN ...' Thanks, gil
