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
 

 

Sort to 2 Output file - Sort and Move

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
nivasaya

New User


Joined: 03 May 2007
Posts: 27
Location: India

PostPosted: Thu Aug 20, 2009 9:10 pm    Post subject: Sort to 2 Output file - Sort and Move
Reply with quote

Dear Team,

Please help me in sorting out the I/P file to 2 O/P file-
1)Select the latest CUST-NUM from the file to O/P2

Organization . . . : PS
Record format . . . : VB
Record length . . . : 3640
Block size . . . . : 27998

CUST-NUM Update-Date
20/AN 6/NUM
(23-42) (3490-3495)

5------------------ 910-----------

0000010000AA0101001 2009234
0000010000AA0101001 2009239
000000000000S01D123 2009123
000000000000S01D123 2009239


O/P 1
CUST-NUM Update-Date
20/AN 6/NUM
(23-42) (3490-3495)

5------------------ 910-----------

0000010000AA0101001 2009239 latest
000000000000S01D123 2009239 latest


2) Move the Data from O/P1 to O/P2
O/P 2 - flat file of length - 300
Move O/P1(22:20) to O/P2(1:20)
Move O/P1((3490:6) to O/P2(22:6)


Thanks & Regards,
Niviasaya
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Aug 20, 2009 10:27 pm    Post subject:
Reply with quote

I can't figure out what you want to do. It's not clear what your records look like. You mention various positions such as 20, 23-42, 910, 3490-3495, 22:20, 1:20, 3490:6 and 22:6. All of that different notation makes it difficult to understand what positions you're talking about. Also, since the input file is VB, the first data byte starts at position 5, not position 1 and I don't think you've taken that into account when giving the starting positions.

Please indicate clearly and in straightforward notation the starting position, length and format of each relevant field taking the RDW in positions 1-4 into account. Explain the "rules" for getting from input to output.

What do you mean by the "latest CUST-NUM"? Do you mean the highest NUM value for duplicate CUST-NUM values?

Do all of your records contain the NUM value or can you have "short" records that end before the NUM value? If so, what do you want to do about those "short" records? Do you want to remove them or use blanks for the NUM value or what?
Back to top
View user's profile Send private message
nivasaya

New User


Joined: 03 May 2007
Posts: 27
Location: India

PostPosted: Fri Aug 21, 2009 12:49 pm    Post subject:
Reply with quote

Hi Frank and Team,

I/P file
CUST-NUM PIC X(20) --> Postion - (23-42)
Update-Date PIC 9(06) --> Postion - (3490-3495)
1) Rule 1: for O/P 1
select the reccord with the Latest date and eliminate the other records for each CUST-NUM

2) Rule 1: for O/P 2

Move O/P1(27:20) to O/P2(1:20)
Move O/P1((3495:6) to O/P2(21:6)
similarly other fields.

Hope this info will give a fair idea.

Thank you all in advance,
Nivisaya
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Aug 21, 2009 9:23 pm    Post subject:
Reply with quote

Quote:
Hope this info will give a fair idea.


Not really. Please address everything in my previous post.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


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