View previous topic :: View next topic
Author
Message
bharath_gct2002 New User Joined: 08 Oct 2007Posts: 27 Location: Dallas, TX
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
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
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
bharath_gct2002 New User Joined: 08 Oct 2007Posts: 27 Location: Dallas, TX
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
bharath_gct2002 New User Joined: 08 Oct 2007Posts: 27 Location: Dallas, TX
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
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
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
bharath_gct2002 New User Joined: 08 Oct 2007Posts: 27 Location: Dallas, TX
Frank I am sorry. I really missed that out. And thanks for editing the topic and re posting
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
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
Please enable JavaScript!