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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


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