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 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: 4650
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm

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