I think that you need to specify each parameter as a separate argument.
In your example, [EMAIL PROTECTED] would be one argument and ls would be
another. One other point: I am not sure about this but I seem to recall
that Unix System Services shell commands expect the first parameter to
be the program invoked (ssh in your example).

You may also wish to inquire or search at MVS-OE
 (see http://www.marist.edu/htbin/wlvindex?mvs-oe)
which is more focused on Unix System Services.

Bill

On Tue, 20 Sep 2005 10:47:57 -0500, Josan Cardenosa
<[EMAIL PROTECTED]> wrote:

>Hi all,
>
>We are using a Z/OS callable services (BPX1SPN) to create a child process
>to run a specified executable file (ssh to be exact) from PL/I program.
>According to the manual  z/OS V1R4.0 UNIX System Services Programming:
>Assembler Callable Service Reference the arguments must be coded :
>
>a) Argument_count must be integer-fullword (DCL ARGUMENT_COUNT  BIN FIXED
>(31); if coded in PL/I).
>
>Argument_count
>    Supplied parameter
>
>    Type:               Integer
>
>    Length:             Fullword
>
>    The name of a fullword that contains the number of pointers in the
>    lists for the Argument_length_list and the Argument_list. If the
>    program needs no arguments, specify 0.
>
>b) Argument_length_list must be a structure of pointers that gives the
>address of fullwords that gives the length of the arguments that is to be
>passed to BPX1SPN  (DCL ARGUMENT_LENGTH_LIST(10)   POINTER;  if coded in
>PL/I).
>
>Argument_length_list
>    Supplied parameter
>
>    Type:               Structure
>
>    Length:             Variable
>
>    The name of a list of pointers. Each pointer in the list is the
>    address of a fullword that gives the length of an argument that is to
>    be passed to the specified program. If the program needs no arguments,
>    specify 0.
>
>c) Argument_list must be a structure of pointers that gives the address of
>fullwords that gives the character string that is to be passed to BPX1SPN
>(DCL ARGUMENT_LIST(10)   POINTER;  if coded in PL/I).
>
>
>Argument_list
>     Supplied
>parameter
>
>
>     Type:
>Structure
>
>
>     Length:             Variable specified by
>Argument_length_list
>
>
>     The name of a list of pointers. Each pointer in the list is
>the
>     address of a character string that is an argument to be passed to
>the
>     specified program.  Each argument is of the length that is
>specified
>     by the corresponding element in the Argument_length_list. If
>the
>     program needs no arguments, specify
>0.
>
>
>
>
>
>
>
>In our case, we are informing these variables like the exemple :
>
>DCL ARGUMENT_COUNT                       BIN FIXED(31);
>DCL ARGUMENT_LENGTH_LIST(1)              POINTER;
>DCL ARGUMENT_LENGTH(1 )                  BIN FIXED(31);
>DCL ARGUMENT_LIST(1)                     CHAR(255);
>DCL ARGUMENT_LISTP(1)                    POINTER;
>
>PATHNAME_LENGTH          = 8;
>PATHNAME          = '/bin/ssh';
>
>ARGUMENT_COUNT           = 1;
>
>ARGUMENT_LENGTH(01)      = 19;
>ARGUMENT_LENGTH_LIST(01) = ADDR(ARGUMENT_LENGTH(01));
>ARGUMENT_LIST(01)   = '[EMAIL PROTECTED] ls';
>ARGUMENT_LISTP(01)       = ADDR(ARGUMENT_LIST(01));
>
>CALL BPX1SPN ( PATHNAME_LENGTH,
>          PATHNAME,
>        ARGUMENT_COUNT,
>         ARGUMENT_LENGTH_LIST,
>        ARGUMENT_LISTP,
>             ENVIRONMENT_COUNT,
>        ENVIRONMENT_DATA_LENGTHP,
>             ENVIRONMENT_DATA_LISTP,
>              FILEDESC_COUNT,
>             FILEDESC_LIST,
>              INHERIT_AREA_LEN,
>             INHERIT_AREA,
>             RETURN_VALUE,
>              RETURN_CODE,
>        REASON_CODE);
>
>Although the return_code returns a valid PID, the arguments aren't
>recognized by the command and the result isn't valid (we look at the
>stdout fd).
>
> BROWSE -- /SYSTEM/tmp/lcp.fd2 ---------------------- Line 00000000 Col
>001 080
> Command ===>                                                  Scroll ===>
>CSR
>********************************* Top of Data
>**********************************
>Usage: [EMAIL PROTECTED] ls Ýoptions~ host
>Ýcommand~
>Options:
>
>  -l user     Log in using this user
>name.
>  -n          Redirect input
>from /dev/null.
>  -F config   Config file (default:
>¨/.ssh/config).
>  -A          Enable authentication agent
>forwarding.
>  -a          Disable authentication agent forwarding
>(default).
>  -X          Enable X11 connection
>forwarding.
>  -x          Disable X11 connection forwarding
>(default).
>  -i file     Identity for public key authentication (default:
>¨/.ssh/identity)
>
>Does anybody know where is the problem?
>
>Thanks.
>Josan Cardenosa
>z/OS System Engineer
>"la Caixa"
>Barcelona - Spain
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to