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
 
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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