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
 

 

Accept an array from SYSIN DD *

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kiran

New User


Joined: 08 Apr 2004
Posts: 25
Location: hyd

PostPosted: Fri May 14, 2004 3:27 pm    Post subject: Accept an array from SYSIN DD *
Reply with quote

Hi pls see the following code,
working-storage section.
01 group.
10 elements pic x(2) occurs 4 times.
77 I pic x(2) value 0.
procedure division.
main-para.
perform para1 until I < 4 times.
para1.
Accept elements(I).
Display elements(I).
I = I + 1.
stop run.


and i'm passing the values from jcl through SYSIN DD * as :

//SYSIN DD *
2
3
4
5
/*

My doubt is whether the Accept elements(I) accepts the elements that are passing from the jcl.

pls clarify the doubt.
Back to top
View user's profile Send private message

imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Fri May 14, 2004 10:26 pm    Post subject:
Reply with quote

Kiran
Have you really tested the code.

First it will give you compile errors beacause of
Code:
 perform para1 until I < 4 times.
.
Second your logic is wrong it should be
Code:
perform para1 until I > 4




Using ACCEPT stmt you can accept sysin(instream) data.
Back to top
View user's profile Send private message
imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Fri May 14, 2004 10:28 pm    Post subject:
Reply with quote

Kiran
In cobol subscripts must not contain value as zero.
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 Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts Need to know what sysin for DFHTU690 ... pkmurali CICS 3 Mon Jul 25, 2016 1:36 pm
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts COBOL Program to Read Array data raj4neo COBOL Programming 8 Sat Aug 15, 2015 12:28 am


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