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

convert the input file fields into a table or array


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Hemamalini Vasudevan

New User


Joined: 21 Sep 2006
Posts: 5

PostPosted: Thu Sep 13, 2007 1:27 pm
Reply with quote

I have a input file which contains 48 field, but of different length.
It could be of great help if this 48 fields are written into a single dimension table with 48 as occurs clause.

For example ,
INPUT-FILE
Name pic x(10)
status pic x(1)


Table
Det occurs 2 times pic x(10)

and i want the usage like
Det(1) as name
det(2) as status.

How do i go about this, is this possible?

Please advice.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Sep 13, 2007 1:35 pm
Reply with quote

Read the record....
Move the fields....
Where is the confusion?
Back to top
View user's profile Send private message
Hemamalini Vasudevan

New User


Joined: 21 Sep 2006
Posts: 5

PostPosted: Thu Sep 13, 2007 1:40 pm
Reply with quote

File has 48 fields , Instead of manually moving, any other way !!!!!
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Thu Sep 13, 2007 2:06 pm
Reply with quote

Hi

what i understond is that u have varible length fields and u want to store these fields into an array. For examp if data is like

aa
aaa
aaaa
aaaaa
bb
bbb

Then u can have an array of lenght 48 and data type as per the hightest length of field you have. For my exa

data-array of length 6 with x(5) so that it can store my hightest length of
'aaaaa' .

Ples correct me if was wrong at understanding
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 13, 2007 8:24 pm
Reply with quote

Hello,

Please clarify this
Quote:
File has 48 fields , Instead of manually moving, any other way !!!!!
You know exactly what you mean, but many of the people here do not.

If use examples it will help.

Does each record have 48 fields? Are they delimited?

If they have different lengths in the same record, how do you know one field from the next?

How does the occurs 48 relate to the occurs 2?

If you more clearly define what you have and what you want to do with it, we will be able to offer suggestions.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Sep 13, 2007 9:00 pm
Reply with quote

are you looking for a MOVE CORR that will work for you?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 13, 2007 10:36 pm
Reply with quote

Or possibly an UNSTRING. . . .

We won't know until more info is posted. . . .
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top