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
 

 

Syncsort - Picking the last value from record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - Picking the last value from record
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    Post subject: hi
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: 1288
Location: Chennai, India

PostPosted: Fri Jul 24, 2009 10:28 am    Post subject: Reply to: Syncsort - Picking the last value from record
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Jul 24, 2009 11:46 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am


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