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

Read an input file using an array


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top