View previous topic :: View next topic |
Author |
Message |
sravanguttu Beginner
Joined: 25 May 2003 Posts: 5 Topics: 3
|
Posted: Tue May 27, 2003 12:44 am Post subject: how can send parameters from jcl to cobol using sysin dd * |
|
|
how can send parameters from jcl to cobol using sysin dd *
plz give me code that how can i extract those values in cobol program.and also give me sysin dd * code. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Tue May 27, 2003 5:09 am Post subject: |
|
|
sravanguttu,
This topic has been discussed recently and here is the link for that topic.
http://www.mvsforums.com/helpboards/viewtopic.php?t=442
Please post the questions in the appropriate forums.This question should be in the JCL forum
Hope this helps...
cheers
kolusu
PS: I am moving this topic to the JCL forum. |
|
Back to top |
|
|
sravanguttu Beginner
Joined: 25 May 2003 Posts: 5 Topics: 3
|
Posted: Thu May 29, 2003 5:11 am Post subject: |
|
|
I have seen that question and answer in that u hav't given clear code.i need clear code what we have to write in jcl and what we need to write in cobol source code. for ex u take i declare 2 variables(ex a & b) in cobol .i need accept values for these (a and b) from jcl how jcl code like? and select clause is needed for sysin in cobol program. plz give me clear idea
Thanku
sravan kumar |
|
Back to top |
|
|
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Thu May 29, 2003 11:32 am Post subject: |
|
|
The DD statement you will need is:
But you already knew that since you stated it in your original posting.
All you need to do for program coding is add a WORKING STORAGE variable and an ACCEPT statement in your PROCEDURE code to get each particular record from SYSIN. Be sure to allow for some condition to occur should the number of records you get from SYSIN vary.
As for giving you the CLEAR CODE, as an IT professional, you should know how to write it from the description I just gave you. |
|
Back to top |
|
|
Venkata Ramana Reddy Beginner
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
|
Posted: Fri May 30, 2003 1:50 pm Post subject: |
|
|
sravanguttu,
This is how the code looks like...
Jcl code
Code: |
//RUNPRGM EXEC PGM=URPRGM
//STEPLIB DD DSN=YOUR.LOAD.PDS,DISP=SHR
//SYSIN DD *
20030530
USA
|
Cobol code
Code: |
WORKING-STORAGE SECTION.
01 WSH-SYSIN-PARMS.
05 WSH-RUN-DATE PIC X(08).
05 WSH-RUN-COUNTRY PIC X(03).
PROCEDURE DIVISION.
00000-MAIN.
ACCEPT WSH-RUN-DATE
ACCEPT WSH-RUN-COUNTRY
|
_________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement. |
|
Back to top |
|
|
|
|