assemblyzos

How do I get the parameters passed in to an assembler program running in the UNIX System Services environment on z/OS?


Trying something a bit different... I usually have a 'driver' program in C to call assembler but I would like to pass parameters from the command line to an assembler program in UNIX System Services. If I assemble a program and then run it as: mypgm p1 p2. Where would I expect to find the parameters p1 and p2? I was hoping off of R1, but that doesn't seem to be the case (although my assembler could easily just be bad). Note that I want an answer for UNIX System Services, not TSO or batch.


Solution

  • Assuming your program will be invoked from the shell, it should have parameters passed to it consistent with

    The information that the service passes to the executable file that is to be run is a parameter list pointed to by register 1. The parameter list consists of the parameter addresses listed in this topic. In the last parameter address, the high-order bit is 1.

    See attached diagram: passed parameter structure