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
 

 

SYGBLSTRIP in SYNC sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 48
Location: india

PostPosted: Sat Mar 09, 2013 10:15 pm    Post subject: SYGBLSTRIP in SYNC sort
Reply with quote

How to get previous record value in rexx user exit written.

I am having a dataset like this..

10
15
17
25

I want my output like this..

10 0
15 5 == ( current record value = 15 - previous record value = 10)
17 2
25 8

How to get this desired output through sort.

Thx in advance.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


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

PostPosted: Sat Mar 09, 2013 10:25 pm    Post subject:
Reply with quote

I've moved your post to JCL part of the Forum, as SyncSort questions are discussed there and your subject line talk about SyncSort.

Also, I don't understand what exact solution are you looking for as I see two different questions there:

Question 1:
Quote:
How to get previous record value in rexx user exit written.

Question 2:
Quote:
How to get this desired output through sort.

I might have misunderstood, however request you to clarify please.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Sat Mar 09, 2013 10:32 pm    Post subject: Reply to: SYGBLSTRIP in SYNC sort
Reply with quote

Anuj, typing it so does not make it so :-)
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Sat Mar 09, 2013 10:45 pm    Post subject:
Reply with quote

For a Saturday night at around 10:30 IST, you were too fast for me, Bill.

Thanks! icon_smile.gif
Back to top
View user's profile Send private message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 48
Location: india

PostPosted: Sun Mar 10, 2013 1:44 pm    Post subject: Reply to: SYGBLSTRIP in SYNC sort
Reply with quote

I tried to get the desired output mentioned in my initial question through syncsort with SYGBLSTRP option in rexx user exit. It did not work for me. So curious to know how to use SYGBLSTRP.

I would also welcome if anyother solution could give me my desired output other than syncsort option that I tried.

Thx,
Gokul Dass
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Sun Mar 10, 2013 3:16 pm    Post subject:
Reply with quote

Quote:
It did not work for me

Not exactly informative. How did it not work for you? As far as I can see, SYGBLSTRP is not an OPTION but a Syncsort supplied variable. According to my research the length of data placed in that variable cannot exceed 1024 bytes and is apparently documented in chapter 7 (coding rexx exits) in the syncsort manual. (Thanks Kolusu, I stole that bit of info from your forum!)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Sun Mar 10, 2013 3:35 pm    Post subject: Reply to: SYGBLSTRIP in SYNC sort
Reply with quote

If you feel the need to use an EXIT, just save the value of the "current" record, and use it to calculate the difference when you get the "next" record.

The updating could be attempted by passing the data back to SyncSort, but why bother since you have all the information in your EXIT to update the then "current" record?

However, there shouldn't be need of an EXIT at all. Your task can be achieved with IFTHEN=(WHEN=GROUP, assuming your SyncSort is sufficiently up-to-date. So let us know.
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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