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
 

 

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 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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


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