MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how can send parameters from jcl to cobol using sysin dd *

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sravanguttu
Beginner


Joined: 25 May 2003
Posts: 5
Topics: 3

PostPosted: Tue May 27, 2003 12:44 am    Post subject: how can send parameters from jcl to cobol using sysin dd * Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Tue May 27, 2003 5:09 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sravanguttu
Beginner


Joined: 25 May 2003
Posts: 5
Topics: 3

PostPosted: Thu May 29, 2003 5:11 am    Post subject: Reply with quote

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
View user's profile Send private message
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Thu May 29, 2003 11:32 am    Post subject: Reply with quote

The DD statement you will need is:
Code:
//SYSIN  DD *

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
View user's profile Send private message Send e-mail Visit poster's website
Venkata Ramana Reddy
Beginner


Joined: 02 Dec 2002
Posts: 70
Topics: 19
Location: California

PostPosted: Fri May 30, 2003 1:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group