Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am
No new posts batch cobol/db2 paragraph fall thru a... alois eisshofer COBOL Programming 5 Wed Mar 14, 2018 12:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us