So many answers! Thank you all. Let's see:

- Yes, I'm clear on the difference between the restrictions imposed by PARM=
(one parm, 100 chars), TSO (a tendency to convert to U/C, and yes, I agree
with gil, over-compensating by converting to l/c when ASIS is specified is
just brain dead), ISPF (a tendency to convert to u/c), and C argv (only one
parm, possibly parsed into words).

- Thank you to Sam who suggested and was kind enough to send me a sample of
CEEPIPI. (Who names these things? I'm hanging out for the holidays with a
four-year-old granddaughter and all I can think of is how she would find
that name hilarious.) Unfortunately, the problem it solves is not the
problem I have. I have a "parm2" problem, not a "performance on multiple
assembler to C calls" problem. The assembler program would be calling the C
program once, or at most "a few" times. AND I have little control over the
assembler code, only the C code.

- Thank you for the suggestion of CEE3PRM which lets a "downstream" function
find the PARM= parameter. Unfortunately, that again is not the problem I
have. I've got a parm2 problem, and if necessary, I can pass it around
myself. It does, however, have the side benefit of making the 100 char
restriction in PARM= look generous. Who decided that 100 chars was too
generous and that 80 would be more than sufficient? (In fairness, there is a
version without that restriction.)

- Thank you especially for the suggestion of the __R1 macro. That seems to
do the job. It may have to go in the main program -- I had problems with
putting it in a downstream function, but I moved it to main() and did not
fully pursue getting it to work outside of main. Its companion __osplist or
whatever it was called looked promising also but I got the problem solved
with __R1. For anyone who is reading this thread and wants the solution,
here is what is working now. (I also am compiling with PLIST(OS) but I don't
*think* that is relevant.) This code could be shortened but this is what is
working at the moment:

// in the main() program
long *r1 = (long *)__R1;     // declares r1 a pointer to a long (address)

char *pm1 = (char *)(*r1);   // makes pm1 a char ptr for r1's 1st parm
r1++;                        // makes r1 point to next parm address      
char *pm2 = (char *)(*r1);   // makes pm2 a char ptr for r1's 2nd parm

Charles

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

Reply via email to