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
 

 

Read an input file using an array

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

New User


Joined: 06 Apr 2005
Posts: 27

PostPosted: Sun Jul 08, 2007 9:47 am    Post subject: Read an input file using an array
Reply with quote

I have an input file of fixed record length 66.

F4950110013ARRRRYTABANTABBNTABCYTABDYTABEYTABFYTABGETABHNTABIYTABJ.

In the following positions of the file there is text which needs to be evaluated.
(18:4),(23:4),(28:4),(33:4),(38:4),(43:4),(48:4),(53:4),(58:4),(63:4).
I want to put a validation in my program using an array, to validate if the position of input file ws-input(17:1) = Y,check if ws-input(18:4) exist in a table or not, similary if position ws-input(22:1)='y' ,check ws-input(23:4) is present in a table ......and so on, till all the text till position ws-input(63:4) needs to be checked if it is present in a table.There are 10 conditions which needs to be checked.
Here for every text which needs to be checked in the table, we need to check the indicator before the text if it is 'Y' or 'N'. Only if it is 'Y', we need to check it in the table.
Could some one help me how this can be done through an array where the validation needs to be performed 10 times.
Back to top
View user's profile Send private message

Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Sun Jul 08, 2007 7:08 pm    Post subject:
Reply with quote

Please show us your file description in working storage. Would it be something like

01 ws-subscript pic s9(3) comp-3.

01 ws-record.
05 whatever pic x(16).
05 ws-flag pic x(1).
88 ws-yes value "y".
05 ws-array occurs 10 times.
10 ws-array-occurance.
15 ws-array-x4 pic x(4).
15 ws-array-x1 Pic x(1).

OK - this will be a very simple routine. It will be routine. Tell us how you will be doing it.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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