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 3 80-byte variables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
kevinsamuel.abraham

New User


Joined: 16 Sep 2008
Posts: 6
Location: india

PostPosted: Wed Sep 17, 2008 4:45 pm    Post subject: Pass 3 80-byte variables
Reply with quote

Hi,

I would like to pass 3 seperate lines of text from my JCl to COBOl ..
Each line is 80 characters in length ..

IS it possible ??
Back to top
View user's profile Send private message

kevinsamuel.abraham

New User


Joined: 16 Sep 2008
Posts: 6
Location: india

PostPosted: Wed Sep 17, 2008 4:46 pm    Post subject: Reply to: Parm parameter
Reply with quote

Forgot to mention that i want to receive it in 3 seperate variables in my cobol prog each of which is x(80)
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 17, 2008 4:55 pm    Post subject: Reply to: Pass 3 80-byte variables
Reply with quote

You'd be reading these in from a dataset via three READ statements, correct?
Back to top
View user's profile Send private message
Cristopher

New User


Joined: 31 Jul 2008
Posts: 53
Location: NY

PostPosted: Wed Sep 17, 2008 5:02 pm    Post subject: Reply to: Parm parameter
Reply with quote

Hello,
You can try using ACCEPT in your cobol program and passing data through SYSIN
Code:

In working storage section.
01 A PIC X(80).
01 B PIC X(80).
01 C PIC X(80).

In Procedure divsion
ACCEPT A
ACCEPT B
ACCEPT C

In JCL
//SYSIN DD *
data for A ..till 80
data for B ..till 80
data for C ..till 80
/*


Cris
Back to top
View user's profile Send private message
kevinsamuel.abraham

New User


Joined: 16 Sep 2008
Posts: 6
Location: india

PostPosted: Wed Sep 17, 2008 5:03 pm    Post subject: Reply to: Pass 3 80-byte variables
Reply with quote

Hi, superk

Well actually ,, i would be doing a fixed process on the input file ... But there are 3 lines of comment that are to be added to the input file at the top ...

And these 3 lines of comment are dynamic .. hence being input from the JCl that runs this COBOL prog ..

i know to pass 10 characters from JCl to COBOl .. through PARM and say SYSIN DD * ..


But now i want to get 3 lines from my JCl .. accept it in my COBOl and then write it to my output file ...
Back to top
View user's profile Send private message
kevinsamuel.abraham

New User


Joined: 16 Sep 2008
Posts: 6
Location: india

PostPosted: Wed Sep 17, 2008 5:10 pm    Post subject: Reply to: Pass 3 80-byte variables
Reply with quote

Hey Cris ,

thanks a lot .. it should work for me ..
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts Need Help to Define 36 Input Fields (... satish.ms10 CLIST & REXX 2 Sat May 07, 2016 3:08 pm


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