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

Sort to 2 Output file - Sort and Move


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Thu Aug 20, 2009 10:27 pm
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
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 Developer


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

PostPosted: Fri Aug 21, 2009 9:23 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


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 4
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
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
Search our Forums:

Back to Top