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
 

 

convert the input file fields into a table or array

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: convert the input file fields into a table or array
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: 2150
Location: At my coffee table

PostPosted: Thu Sep 13, 2007 1:35 pm    Post subject:
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    Post subject: Reply to: convert the input file fields into a table or arra
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    Post subject:
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

Site Director


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

PostPosted: Thu Sep 13, 2007 8:24 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Thu Sep 13, 2007 9:00 pm    Post subject:
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

Site Director


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

PostPosted: Thu Sep 13, 2007 10:36 pm    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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