Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Store Previos record value

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

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Wed Oct 28, 2009 10:15 am    Post subject: Store Previos record value
Reply with quote

Hi,

Is there any way to store previous record value thru sort/syncort/icetool???

Input file
CH-LoBX(2) A-monthX(2)
01 02
02 03

output file
if CH-LOB not equal to 02 then A-month = X-month
else previous A-month = X-month

OUTPUT fILE
CH-LoBX(2) A-monthX(2) X-monthX(2)
01 02 02
02 03 02

Can anybody help me on this???
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 28, 2009 12:22 pm    Post subject:
Reply with quote

Please state which sort product that you are actually using, DFSORT, SYNCSORT or CA-SORT, as the solution may vary from product to product and it would be rather unfair for someone to provide you an answer that would not work with the software that you have installed.
Back to top
View user's profile Send private message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Wed Oct 28, 2009 12:31 pm    Post subject: Reply to: Store Previos record value
Reply with quote

DFSORT, SYNCSORT or ICETOOL anything would work for me...
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: Wed Oct 28, 2009 7:56 pm    Post subject:
Reply with quote

Hello,

Quote:
anything would work for me...
I suspect that "anything" might work, but you most likely do not have all of the sort products installed.

You need to post which sort product(s) are installed and which releases of them so as to not waste multiple people's time. . .
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Oct 28, 2009 8:56 pm    Post subject:
Reply with quote

nazia.lalani,

Assuming you have DFSORT the following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                   
0102                                                             
0203                                                             
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                               
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,2,CH,NE,C'02'),PUSH=(5:3,2)) 
//*


The output of this is

Code:

010202
020302
Back to top
View user's profile Send private message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Thu Oct 29, 2009 5:15 pm    Post subject:
Reply with quote

Hi sri

When I tried the solution given by you I m getting syntax error
Will group function not work for Z/OS 1.2.3.1R????
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 29, 2009 6:30 pm    Post subject:
Reply with quote

expat wrote:
Please state which sort product that you are actually using, DFSORT, SYNCSORT or CA-SORT, as the solution may vary from product to product and it would be rather unfair for someone to provide you an answer that would not work with the software that you have installed.

My guess is that you have SYNCSORT installed and have, despite being asked not to, allowed one of the DFSORT guys to give you a solution that will not work using SYNCSORT icon_evil.gif

This is why I wrote my original response above.

Please post the error messages and codes issued and maybe someone will be able to help you resolve this.
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: Thu Oct 29, 2009 9:12 pm    Post subject:
Reply with quote

Hello,

Quote:
Will group function not work for Z/OS 1.2.3.1R????
Yes, it will not work with that release of Syncsort.

If your system is upgraded to the current release of Syncsort, GROUP should work. . .
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 Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us