Frank Swarbrick wrote:

>In Cobol the length parameter for linkage from a JCL PARM is a two-byte 
field.  Is this not the case in assembler?

If a primary program (compiled in any language) receives a parm via JCL, there 
is a standard as imposed by IBM.

As documented: There is NO limit in parameter length, quantitity of 
parameters and there is NO system-defined format.

Basically, the length and format are determined by the program/system which 
is used to call the program (using the parameter) in question.

So, for example, the JCL interpreter/converter determines the parm length to 
100 bytes (including commas) as documented.

Linkage convention is that the address of the parameter is in GPR 1. The 
length field is on a 2 byte boundary on that address.

This convention is independent of the language used to compile and link-edit 
your program(s).

I suggest that you read MVS Programming: Assembler Services Guide and MVS 
JCL Reference for more info. 

My own example of parm usage (Parm: Julian date) :

         L     R2,0(R1)                PARM (YYYYDDD)
*                               
         CLC   0(2,R2),=X'0000'        No Parms supplied
         BNE   NEXT
         WTO   ' No Parms supplied, processing continues...'
         B     NOPARM
NEXT  CLC   0(2,R2),=X'0007'        CHECK FOR LENGTH
         BNE   PARMERR
*
         WTO   ' Date was supplied.'
... ETC ... 

HTH

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
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