A parameter list in Assembler can be a little difficult. There's the official rule and the rule usually used.
The official ruleA parameter list is a group of addresses. The address of this group of addresses is in register 1 when your program gets control. For example -
CALL XYZ,(DATA1,DATA2),VL
...
DATA1 DC ...
DATA2 DC ...
What program XYZ gets in register 1 is the address of
DC A(DATA1,X'80000000'+DATA2)
The VL in the CALL macro directs the macro to store the high order bit in the last word of the parameter list.
Now, in z/OS, if program XYZ is called from JCL, say
// EXEC PGM=XYZ,PARM='HELLO FROM JCL'
Register 1 will point to
DC A(X'80000000'+PARMLEN)
...
PARMLEN DC AL2(14),C'HELLO FROM JCL'
Obviously the contents of register 0, and registers 2 through 12 are pretty much undefined when a program is called through JCL. This is also true when a program is entered the ATTACH.
Unoffical UsageWhen a program is entered through static linkage – that is with a CALL macro – registers 2 through 12 are not altered. Register 0 is not altered unless it is used by the macro for some reason, as is true of register 1. In other words,
will not alter registers 0 and 1.
In my work I heavily use a program that creates messages from a format. It is called like this.
LA 0,FMTWORK
LA 1,FORMAT
L 15,=V(FMTPGM)
CALL (15)
...
FMTWORK DS XL200
FORMAT ...
FMTWORK is just a work area, but it is also used as a buffer for the completed message. The contents of the FORMAT data area are just codes for FMTPGM to create the message.
You mentioned using a register. Well, part of the codes in the format are instructions to use registers as data addresses, or if it is done correctly, to use the contents of registers as data. For example
FORMAT DC AL1(L'TEXT1)
TEXT1 DC C' UNABLE TO OPEN '
DC AL.2(3),AL.6(0),AL1(L'DCBDDNAM,0),SL2(DCBDDNAM),X'FF'
Now I won't go into much detail about the format - it would really work correctly with the format program. The SL2(DCBDDNAM) part of the last line is an address in base register offset form just like in an instruction. The format program constructs the address just like the hardware does for an instruction and inserts the data into the message.
Can you use a register in a parameter list?Yes and no.
LA 3,DATA2
CALL XYZ,(DATA1,(3)),VL
will not work; the CALL macro is too dumb. On the other hand
LA 3,DATA2
CALL XYZ,(DATA1,(3)),VL,MF=(E,PARMLIST)
...
PARMLIST DS XL8
works fine. What you're doing here is creating a remote parameter list. The MF=(E,PARMLIST) stuff tells the CALL macro to create a remote parameter list and where it is.
You are asking good questions. I don't know enough about Assist to know the answers in Assist. The answers I'm giving apply to regular Assembler.