Thanks Peter.

What I have done since I posted the query was to code a small assembler program:

MYTSTPGM CSECT
         USING *,15
         EXRL  0,*
         END   MYTSTPGM

I then called this program instead of BPXWDYN and took a look at the dump.
Sure enough, R0 is not zero.
In looking at the storage pointed to by R0, it looks a bit like the results of 
a BLDL against BPXWDYN.



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
chuck.har...@thermofisher.com  | 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:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Farley, Peter x23353
Sent: Tuesday, January 31, 2017 10:14 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Calling bpxwdyn from CA-Easytrieve

I don't know in which language CA Easytrieve is coded, but a few years back I 
tried setting up calls to BPXWDYN in Enterprise COBOL (V4.1 at the time) and 
they did not work because COBOL does not zero R0 as BPXWDYN requires.  I had to 
code an assembler stub routine to put between the COBOL program and BPXWDYN to 
get it to work.  For simplicity the stub was non-reentrant to be able use the 
LOAD macro to find a copy of BPXWDYN and save the entry point address for later 
use.

Email me privately if you want a copy of the stub routine.  It wasn't hard to 
code, 40 actual code lines and 7 lines of comments.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Hardee, Chuck
Sent: Tuesday, January 31, 2017 7:41 AM
To: IBM-MAIN@LISTSERV.UA.EDU
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:chuck.har...@thermofisher.com>
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
chuck.har...@thermofisher.com<mailto:chuck.har...@thermofisher.com>  | 
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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to