View previous topic :: View next topic
|
Author |
Message |
daye.Zheng
New User
Joined: 15 Feb 2008 Posts: 22 Location: China
|
|
|
|
Hi all,
Anybody could give me a detailed sample for how to using the PARM
parameter.
Thank you! |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
It's all in the fine manual (guess what - even examples...)
O. |
|
Back to top |
|
|
daye.Zheng
New User
Joined: 15 Feb 2008 Posts: 22 Location: China
|
|
|
|
Hi ofer71.
Thank you for your reply.
I have read the manual you posted, but i still do not konw how the program recieve the 'pram' that PARM parameter passed. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
assuming it's a COBOL program here is an example of the JCL
Code: |
//MATCH EXEC PGM=ALLDUP,PARM='003,010'
|
Here is an example in the source code
Code: |
LINKAGE SECTION.
01 PARM-AREA.
03 PARM-LENGTH PIC S9(4) COMP.
03 PARM-START PIC 9(3).
03 FILLER PIC X.
03 PARM-END PIC 9(3).
EJECT
PROCEDURE DIVISION USING PARM-AREA.
|
This from someone who has minutely dabbled in Cobol language.
Gerry |
|
Back to top |
|
|
daye.Zheng
New User
Joined: 15 Feb 2008 Posts: 22 Location: China
|
|
|
|
Hi Gerry,
Thank you so much! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Note that it's up to you to parse/edit the PARM value.
You might want to check the length for validity. In Gerry's example above, if you really expect a comma in position 4, it'll be up to you to check that, too. etc. etc. etc. |
|
Back to top |
|
|
|