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

Syncsort - Picking the last value from record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Wed Jul 22, 2009 12:32 am
Reply with quote

Hi Experts,

I am in a problem. I want to sort my data such that the output is always the last record.

I/P file
U1 P1 A1 A2 A3
U1 P2 A1
U1 P3 A1 A2 A3 A4

O/P file
U1 P1 A3
U1 P2 A1
U1 P3 A4

U1 is of 2 characters. P1 is of 10 characters and values are in array format with range upto 25.

Can we achieve this using SYNSORT.

Thanks in Advance.
Back to top
View user's profile Send private message
sdsinfo

New User


Joined: 14 Jan 2008
Posts: 10
Location: bangalore

PostPosted: Thu Jul 23, 2009 5:05 pm
Reply with quote

it is possible to sort your records in such a way that ur last value of record will be at last but ur records position will be changed.. do u want to sort in this way or you must need first record's last value should be in the first record itself in forst position ?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Jul 24, 2009 10:28 am
Reply with quote

Rgupta,

Quote:
am in a problem. I want to sort my data such that the output is always the last record.


Going by the response, I do not think the requirement is clear.

Please explain in case you need a working JCL for your requirement.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Jul 24, 2009 10:30 pm
Reply with quote

Hi Aaru,

The record is of the format
<key1 Key2><Count><value1><value2><value3>...........<value25>
Key1 is of 2 characters
Key2 is of 10 character
Count defines no of values present in the record. I need to pick the last record.i.e. the value which is equal to count.
Value is of 4 characters
Values are a type of array that range from 1 to 25.

Thanks
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Fri Jul 24, 2009 10:37 pm
Reply with quote

What is the size and format of the count, packed decimal, zoned decimal, binary?
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: Fri Jul 24, 2009 11:46 pm
Reply with quote

Hello,

Quote:
<key1 Key2><Count><value1><value2><value3>...........<value25>
There is no count shown in the "sample" data.

It will help if you post more realistic data rather than alphabet soup. . .

As Craig mentioned, you need to post all of the info needed to meet this requirement.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top