Paul Gilmartin wrote:
On Thu, 21 Dec 2006 13:32:02 -0700, Steve Comstock wrote:
But once again, I'm running into troubles with C.
But it looks like argp[0]->argstring_len is
16448 (decimal; this is '4040' in hex, so it
looks like I'm getting spaces in what is
expected to be a length field).
Any suggestions on this?
This should be identical to the interface of JCL EXEC PGM=...,PARM=...
so you have a ready experimental control.
Well, except that PARM= only gives me one argument
(except for the way the C runtime formats it) whereas
this is an array of halfword prefixed strings, so the
traditional argc and argv constructs don't apply, I
don't think.
Can you supply an excerpt of the failing Rexx code?
-- gil
Sure; this is only a subset, but it includes the essence:
/* This routine prompts which program to run, then
prompts for a parm string, then address linkmvs-es
to the program passing the parm string */
'ispexec libdef ispllib id(a7.tr.load) dataset stack'
vars.=''
domloop = 'more'
do until domloop = 'NO'
clrscrn
say '=============== ADDRESS LINKMVS of xxxLA2 =================='
say
say 'Enter the name of the program to address linkmvs to; one of:'
say ' ALCLA2'
say ' CLA2'
say ' COBLA2'
say ' PLILA2'
say
pull pgm1
if pgm1 = alcla2 | pgm1 = cla2 | pgm1 = cobla2 | pgm1 = plila2
then domloop = 'NO'
else do
say 'Please enter one of the listed choices'
say
say 'Press <ENTER> to continue'
say
pull
end /* response to invalid request */
end /* do until domloop = 'NO' */
call get_parms
if vars.1 = '' then
address linkmvs pgm1
else
address linkmvs pgm1 'vars.1 vars.2 vars.3 vars.4 vars.5'
say ' '
call show_parms
say
say 'Press <ENTER> to continue'
pull
'ispexec libdef ispllib'
return
get_parms:
vars.=''
clrscrn
say ' == Get Parms for address linkmvs and address attchmvs ====='
say ' == =='
say ' '
say ' Enter a string for each of five variables to be '
say ' passed to your program.'
say ' '
say ' If you just press <Enter>, a value of Dummy will be'
say ' passed, except that if you just press <Enter> on the'
say ' first variable, no variables will be passed.'
say ' '
say ' Enter a value for variable number 1 ...'
parse pull vars.1
if vars.1 = '' then return
say ' Enter a value for variable number 2 ...'
parse pull vars.2
say ' Enter a value for variable number 3 ...'
parse pull vars.3
say ' Enter a value for variable number 4 ...'
parse pull vars.4
say ' Enter a value for variable number 5 ...'
parse pull vars.5
return
show_parms:
say ' == On return from your program, we see the following: ====='
say ' == =='
say ' '
say ' Enter a string for each of five variables to be '
say ' passed to your program.'
say ' '
say ' If you just press <Enter>, a value of Dummy will be'
say ' passed, except that if you just press <Enter> on the'
say ' first variable, no variables will be passed.'
say ' '
say ' Value for variable number 1: ' vars.1
say ' Value for variable number 2: ' vars.2
say ' Value for variable number 3: ' vars.3
say ' Value for variable number 4: ' vars.4
say ' Value for variable number 5: ' vars.5
say ' '
drop vars.
return
-------
Kind regards,
-Steve Comstock
----------------------------------------------------------------------
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