Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Pass value from jcl to cobol through sysin

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
namashlr
Currently Banned

New User


Joined: 27 Aug 2006
Posts: 5

PostPosted: Tue Sep 26, 2006 8:04 pm    Post subject: Pass value from jcl to cobol through sysin
Reply with quote

Hi,
if we pass the value from jcl to cobol through sysin dd *,how the passing values accept in cobol program.
let me know ......
Back to top
View user's profile Send private message

Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Tue Sep 26, 2006 8:12 pm    Post subject: Re: Pass value from jcl to cobol through sysin
Reply with quote

The COBOL program would use the ACCEPT statement to accept the data from the SYSIN DD to a section of WORKING-STORAGE.

Ex.
Code:

       IDENTIFICATION DIVISION.                       
       PROGRAM-ID. MYPROG.     
       ENVIRONMENT DIVISION.                           
       INPUT-OUTPUT SECTION.           
       ...
                                                         
       WORKING-STORAGE SECTION.                           
       01 INPUT-PARAMETER PIC X(254).
       ...
       PROCEDURE DIVISION.
       ACCEPT INPUT-PARAMETER FROM SYSIN.
       ...
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Wed Sep 27, 2006 10:42 am    Post subject:
Reply with quote

just to add..

when you pass data thru SYSIN....u can handle the data thru ACCEPT statement in the Cobol code.

If you pass data as PARM, the parm data can be handled using the linkage declaretion.

~Vamsi
Back to top
View user's profile Send private message
babu kota

New User


Joined: 20 Sep 2006
Posts: 1

PostPosted: Wed Sep 27, 2006 12:42 pm    Post subject: syntax in jcl
Reply with quote

can you post the JCL syntax for passing values to cobol
Back to top
View user's profile Send private message
gayathrieka

New User


Joined: 27 Sep 2006
Posts: 1

PostPosted: Wed Sep 27, 2006 3:58 pm    Post subject: Re: Pass value from jcl to cobol through sysin
Reply with quote

in cobol, if u have statements like below,

ACCEPT A.
ACCEPT B.

then in jcl, the values are passed as

//SYSIN DD *
12
15
/*
//
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us