IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Pass 3 80-byte variables


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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

Global Moderator


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

PostPosted: Wed Sep 17, 2008 4:55 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top