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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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