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
 

 

reading input file into 2 diff records of same format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
View previous topic :: :: View next topic  
Author Message
shakthyp

New User


Joined: 10 Sep 2008
Posts: 6
Location: Chennai,India

PostPosted: Thu Sep 18, 2008 4:38 pm    Post subject: reading input file into 2 diff records of same format
Reply with quote

how do i read input file record into 2 different records of the same format.

for eg if i need to read the file INP-FILE into WS-REC1 and WS-REC 2
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Sep 18, 2008 4:49 pm    Post subject:
Reply with quote

READ INTO
and
MOVE
Back to top
View user's profile Send private message
shakthyp

New User


Joined: 10 Sep 2008
Posts: 6
Location: Chennai,India

PostPosted: Thu Sep 18, 2008 4:53 pm    Post subject:
Reply with quote

That is not working since both the records have many redefines clause. I tried moving it this way

MOVE CORRESPONDING WS-REC1 to WS-REC2

But this way also it is not working.... icon_redface.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7933
Location: Bellevue, IA

PostPosted: Thu Sep 18, 2008 4:57 pm    Post subject:
Reply with quote

MOVE CORRESPONDING only moves fields with the same name and structure; unless there's a lot of name duplication I can see why it wouldn't work.

Why don't you just READ and put both definitions in the FD? I don't normally recommend working in the buffer but there are times when it can be handy.
Back to top
View user's profile Send private message
shakthyp

New User


Joined: 10 Sep 2008
Posts: 6
Location: Chennai,India

PostPosted: Thu Sep 18, 2008 5:02 pm    Post subject:
Reply with quote

Could you please be more clear on using the FD? Im sorry i have not used it earlier.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Thu Sep 18, 2008 5:18 pm    Post subject:
Reply with quote

Hello,

You can specify multiple record layouts for a file in FD one after the other. Each layout will be an implicit redefinition of the original layout.

Arun
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Sep 19, 2008 2:19 pm    Post subject:
Reply with quote

shakthyp wrote:
That is not working ...
How is "that" not working needs more explanation, also I didn't understand this
Quote:
2 different records of the same format.
from your very first post..

From other suggestions it seems that to have multiple (two for this thread)"01" level records can be your choice but if so why would you move values from WS-REC1 to WS-REC2, they are two different "layout" for the same record..
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 -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm


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