You are correct, I saw that too, but in my defense, in the example there is a blank space at the end of the parameter string and there is also and the "+1" in the length value (just to make things confusing).
Al Nims Systems Admin/Programmer 3 UFIT University of Florida (352) 273-1298 -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Hardee, Chuck Sent: Tuesday, January 31, 2017 10:33 AM To: [email protected] Subject: Re: Calling bpxwdyn from CA-Easytrieve While you think you would be right, check the end of the string and you will see that there is a space present. That makes the PARM length equal to the actual number of characters plus 1. It's the return parms that must include 1 extra byte for the string terminator to occupy. Just to be clear, this is NOT an assembler program. It is an CA-Easytrieve program. The variables are defined using CA-Easytrieve's definition format. I simply supplied them here in assembler form to make things a bit easier for explanation. Charles (Chuck) Hardee Senior Systems Engineer/Database Administration EAS Information Technology Thermo Fisher Scientific 300 Industry Drive | Pittsburgh, PA 15275 Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230 [email protected] | www.thermofisher.com WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent of a system responsible for delivering the message to the intended recipient, is prohibited. If you are not the intended recipient, please inform the sender and delete all copies. -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Nims,Alva John (Al) Sent: Tuesday, January 31, 2017 10:06 AM To: [email protected] Subject: Re: Calling bpxwdyn from CA-Easytrieve I think you forgot to do the "+" in: bpxwdyn-command DC Y(L'bpxwdyn-info) should be: bpxwdyn-command DC Y(L'bpxwdyn-info+1) Al Nims Systems Admin/Programmer 3 UFIT University of Florida (352) 273-1298 -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Hardee, Chuck Sent: Tuesday, January 31, 2017 7:41 AM To: [email protected] Subject: Calling bpxwdyn from CA-Easytrieve I have a need to be able to call bpxwdyn from within an CA-Easytrieve "program". According to the manual, IBM says that bpxwdyn can be called from non-REXX environments as long as certain rules are followed. It also states that values can be returned as long as the return value parameter follows the following format: PARMx DC Y(L'PARMxVAL+1) PARMxVAL DC C'parameter value ' (Notice the very important space at the end of the value string!) The manual states that the length must be 1 greater than the maximum length possible for the returned attribute. Since a dataset name can only be 44 bytes, the length value should be fine. My need it to call bpxwdyn and have it return to me the dataset name associated with a specific DD name. I have built the "command" string as follows: bpxwdyn-command DC Y(L'bpxwdyn-info) bpxwdyn-info DC C'INFO FI(MYDDN) ' I have built the information return parameter as follows: bpxwdyn-dsname-p DC Y(102) bpxwdyn-dsname DC CL100'INRTDSN ' The call in Easytrieve is CALL BPXWDYN USING (bpxwdyn-command, bpxwdyn-dsname-p) What's happening is that I getting a return code of 20, invalid parameter. What I don't get is whether it is with my command string or my returned value strings. The manual states that on a call from a non-REXX environment, R0 must be zero. According to the Easytrieve manual, the CALL verb generates an MVS convention calling list. So, based on that I can only assume that the last address in the parameter list has it's high order bit on. Also, have written several routines which trigger off of the number of parameters with the number of parameters signaled by the high order but of the last one being on, and having called these routines successfully in Easytrieve, I suspect my assumption is correct. What I don't know is whether Easytrieve sets R0 to zero for the call. If it doesn't, that could account for the return code of 20. So, my question is, has anyone ever called bpxwdyn from within an Easytrieve program? Thanks, Chuck Charles (Chuck) Hardee<mailto:[email protected]> Senior Systems Engineer/Database Administration EAS Information Technology<mailto:DBA%20Engineering%20-%20DB2_IDMS> Thermo Fisher Scientific 300 Industry Drive | Pittsburgh, PA 15275 Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230 [email protected]<mailto:[email protected]> | www.thermofisher.com WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent of a system responsible for delivering the message to the intended recipient, is prohibited. If you are not the intended recipient, please inform the sender and delete all copies. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
