|
|
| Author |
Message |
Roshnii
New User
Joined: 30 Sep 2008 Posts: 27 Location: bangalore
|
|
|
|
Hi,
I need to pass the time from the jcl to my program using parms.
how do I go about this ? |
|
| Back to top |
|
 |
References
|
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3544 Location: Brussels once more ...
|
|
|
|
Is the program already written ?
If so, speak to the programmer to determine the method required by the program.
PARMS may be interpreted as either using the PARM= field on the exec card, or maybe //PARMS DD *, or PARMS DD whatever
Please be clear about your post. |
|
| Back to top |
|
 |
Robert Sample
Senior Member
Joined: 06 Jun 2008 Posts: 941 Location: Atlanta, GA
|
|
|
|
| Moreover, how are you getting the time in JCL? JCL merely executes programs and has no way to determine the time without invoking a program anyway. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3544 Location: Brussels once more ...
|
|
|
|
And if you do invoke a program to establish the time, you can not update the JCL to use the PARM= option as the JCL will already be interpreted by the JES sub system.
However this may be possible if using a job scheduling software. |
|
| Back to top |
|
 |
Roshnii
New User
Joined: 30 Sep 2008 Posts: 27 Location: bangalore
|
|
|
|
the time will be manually put in the jcl. its like passing any value.
the program will accept it thru the linkage section
| Code: |
LINKAGE SECTION.
01 W300-PARM-VARIABLES.
05 W300-PARM-LENGTH PIC S9(4).
05 W300-PARM-DATA PIC X(4).
|
I tried in the jcl by passing like this
,PARM='0019'
where 0019 is the time but it did not work. |
|
| Back to top |
|
 |
Moved: Thu Oct 09, 2008 6:05 pm by superk From JCL to Mainframe COBOL |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3544 Location: Brussels once more ...
|
|
|
|
Have you tried
EXEC PGM=whatever,PARM='0019' |
|
| Back to top |
|
 |
dineshsjce Warnings : 1 New User
Joined: 16 Apr 2007 Posts: 33 Location: Bangalore
|
|
|
|
Hi,
Below is the use of PARM in a COBOL program. Try this way.
LINKAGE SECTION.
01 PARM-REC.
05 PM-LEN PIC S9(04) COMP.
05 DQ-FLG PIC X(01).
05 HD-FLG PIC X(01).
PROCEDURE DIVISION USING PARM-REC.
For the above COBOl code PARM in JCL looks like this:
EXEC PGM=Whatever, PARM='YY'.
Hope this will help you. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8729 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| where 0019 is the time but it did not work. |
What does that mean?
If you want forum help, you have to provide something to work with.
"It did not work" is basically useless for problem solving. . .
When you clarify what problem(s) you encountered, someone will be able to tell you what is wrong. |
|
| Back to top |
|
 |
Terry Heinze
Active User
Joined: 14 Jul 2008 Posts: 176 Location: Richfield, MN, USA
|
|
|
|
Roshnii,
W300-PARM-LENGTH must be usage BINARY (COMP or COMP-5). |
|
| Back to top |
|
 |
Sambhaji Warnings : 1 Active User
Joined: 16 Feb 2007 Posts: 267 Location: Pune, India
|
|
| Back to top |
|
 |
|
|