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

CHANGE Option in Syncsort seems to be not working.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bharath_gct2002

New User


Joined: 08 Oct 2007
Posts: 27
Location: Dallas, TX

PostPosted: Tue Aug 26, 2008 2:25 am
Reply with quote

Hi,

I have a File (LRECL = 150) as given below (I have only shown 72 columns as the condition that I need occurs at 62nd column itself):
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000020080605000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080605000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000020080605000
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000


I need to create an output file with this and I need to change the dates in Column 62 based on the below values:

If deposit date is 5/14, change it to 5/22
If deposit date is 5/15, change it to 5/23
If deposit date is 5/16, change it to 5/29
If deposit date is 5/19, change it to 5/30
If deposit date is 5/20, change it to 6/2

I wrote a SORT as below:


Code:

//PS0200   EXEC PGM=SORT                                             
//SORTIN   DD DSN=Input file...
//SORTOUT  DD DSN=Output file...         
//SORTWK01 DD SPACE=(CYL,(10,10))                                     
//SORTWK02 DD SPACE=(CYL,(10,10))                                     
//SYSOUT   DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  OPTION COPY                                                         
  OUTFIL OUTREC=(1,61,                                               
                 62,8,                                               
                   CHANGE=(8,                                         
                           C'20080514',C'20080522',                   
                           C'20080515',C'20080523',                   
                           C'20080516',C'20080529',                   
                           C'20080519',C'20080530',                   
                           C'20080520',C'20080602'),                 
                   NOMATCH=(62,8),
               70,81)
/*                                   


But the sort gives out the same file as Input to Output. I cannot find the mistake in it. Please help me. Please let me know if you have any questions.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Aug 26, 2008 3:12 am
Reply with quote

When I run your job with DFSORT, I get the dates changed the way you want. I suspect that your dates do NOT really start in position 62. Is your input file actually VB? If so, then you need to count the RDW in positions 1-4 when determining the starting position, so it would be 66, not 62. If your input file is FB, then you need to figure out where the date field really starts. You can use this DFSORT job to see what's actually in positions 62-69:

Code:

//SHOW EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN=...  input file       
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                             
  OPTION COPY                               
  INREC BUILD=(1,4,X,62,8)                   
/*


By the way, you could use OVERLAY instead of BUILD in your job to make things easier, and you should remove the //SORTWKxx DDs as they aren't needed for a COPY. So if your input file is VB, the job would be:

Code:

//S1   EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=...  input file (VB)
//SORTOUT  DD DSN=...   output file (VB)
//SYSIN    DD *
  OPTION COPY
  OUTFIL OVERLAY=(66:66,8,
                   CHANGE=(8,
                           C'20080514',C'20080522',
                           C'20080515',C'20080523',
                           C'20080516',C'20080529',
                           C'20080519',C'20080530',
                           C'20080520',C'20080602'),
                   NOMATCH=(66,8))
/*
Back to top
View user's profile Send private message
bharath_gct2002

New User


Joined: 08 Oct 2007
Posts: 27
Location: Dallas, TX

PostPosted: Tue Aug 26, 2008 3:16 am
Reply with quote

My input file is FB and with a LRECL of 150 and I jus copy pasted the file from the TSO. Also I double checked the dates start right at position 62. All these make me wonder how could this happen. I am not sure there is a problem with the DFSORT version/Update.
Back to top
View user's profile Send private message
bharath_gct2002

New User


Joined: 08 Oct 2007
Posts: 27
Location: Dallas, TX

PostPosted: Tue Aug 26, 2008 3:38 am
Reply with quote

Code:

 WER052I  END SYNCSORT - JOBNAME1,SHOW,,DIAG=C200,5106,EA2E,0066,8AC2,6C8B,2A68,,C4E2
   F 3: 0h596                                                                   
0500 13706 :                                                                   
0080 20080301                                                                   
509: 80045250                                                                   
6778 509: 0e3                                                                   
0806 0 3: 0b3                                                                   
0933 w2008051                                                                   
4020 33022094                                                                   
2052 00459891                                                                   
0080 01604502                                                                   
2772 01052920                                                                   
0885 76317052                                                                   
0720 29200800                                                                   
0024 80121122                                                                   
5800                                                                           


This is what I got when I ran the SORT:
Code:

//SHOW EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                       
//SORTIN   DD DSN=...  input file       
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD *                             
  OPTION COPY                               
  INREC BUILD=(1,4,X,62,8)                   
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Aug 26, 2008 3:46 am
Reply with quote

Your Subject line is "CHANGE Option in DF SORT seems to be not working" and you talk about DFSORT, but if you look at the messages from your run, you'll see:

WER052I END SYNCSORT

That says you're using Syncsort, not DFSORT. So why do you think you're using DFSORT and why are you posting in the DFSORT Forum?

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.

I'm changing your Subject line and moving your post to the JCL Forum.
Back to top
View user's profile Send private message
bharath_gct2002

New User


Joined: 08 Oct 2007
Posts: 27
Location: Dallas, TX

PostPosted: Tue Aug 26, 2008 7:19 am
Reply with quote

Frank I am sorry. I really missed that out. And thanks for editing the topic and re posting
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Aug 26, 2008 7:27 am
Reply with quote

Hello,

This:
Code:
//SYSIN DD *                                                   
  OPTION COPY                                                   
  OUTFIL OUTREC=(1,61,                                         
                 62,8,                                         
                   CHANGE=(8,                                   
                           C'20080514',C'20080522',             
                           C'20080515',C'20080523'),           
                   NOMATCH=(C'NONE    '),                       
                 70,10)                                         
using this data:
Code:
//SORTIN DD *                                                           
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080605000
000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000020080605000
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080515000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
000000000000000000000000000000000000000000000000000000000000020080514000
/*                                                                     
gives this output:
Code:
000000000000000000000000000000000000000000000000000000000000020080523000
000000000000000000000000000000000000000000000000000000000000020080523000
0000000000000000000000000000000000000000000000000000000000000NONE    000
0000000000000000000000000000000000000000000000000000000000000NONE    000
0000000000000000000000000000000000000000000000000000000000000NONE    000
000000000000000000000000000000000000000000000000000000000000020080523000
000000000000000000000000000000000000000000000000000000000000020080523000
000000000000000000000000000000000000000000000000000000000000020080522000
000000000000000000000000000000000000000000000000000000000000020080522000
000000000000000000000000000000000000000000000000000000000000020080522000
000000000000000000000000000000000000000000000000000000000000020080522000
000000000000000000000000000000000000000000000000000000000000020080522000
000000000000000000000000000000000000000000000000000000000000020080522000


There must be something about your file. You might try to run your process with DD * data rather than the actual file.
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 Compare only first records of the fil... SYNCSORT 7
No new posts SCOPE PENDING option -check data DB2 2
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
Search our Forums:

Back to Top