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

SYGBLSTRIP in SYNC sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


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

PostPosted: Sat Mar 09, 2013 10:25 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Mar 09, 2013 10:32 pm
Reply with quote

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

Superior Member


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

PostPosted: Sat Mar 09, 2013 10:45 pm
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
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: 2455
Location: Hampshire, UK

PostPosted: Sun Mar 10, 2013 3:16 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Mar 10, 2013 3:35 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top