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
 

 

CHANGE Option in Syncsort seems to be not working.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: CHANGE Option in Syncsort seems to be not working.
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 Moderator


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

PostPosted: Tue Aug 26, 2008 3:12 am    Post subject:
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    Post subject: Reply to: CHANGE Option in DF SORT seems to be not working.
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    Post subject:
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 Moderator


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

PostPosted: Tue Aug 26, 2008 3:46 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Aug 26, 2008 7:27 am    Post subject:
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


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