View previous topic :: View next topic
|
Author |
Message |
Kamlesh Kamal
New User
Joined: 16 May 2008 Posts: 36 Location: Kolkata,India
|
|
|
|
Hi,
I have a file whose record format is VB and Record length . . . : 26742
Block size . . . . : 27998
I need to copy this file to a new file having the same parameters but insering SPACES from 2303 - 2338 bytes.
I tried the following sort but it's not working.Can someone help me please.
Code: |
//STEP01 EXEC PGM=SYNCSORT
//SORTIN DD DSN=E0421T.E0421SA1.STIEXT.CON.Z1010220.W10.KK,DISP=SHR
//SORTOUT DD DSN=E0421T.E0421SA1.STIEXT.CON.Z1010220.W10.KK1,
// DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,2302,2303:2303,36)
/* |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Do not post "it's not working". . .
How can anyone use this to help. . . It is just a waste of time.
Did you get an error? An abend? Unexpected results?
Is there some reason you did not post the information generated by the problem run? |
|
Back to top |
|
|
Kamlesh Kamal
New User
Joined: 16 May 2008 Posts: 36 Location: Kolkata,India
|
|
|
|
Sorry for wasting your time , I used the sort card below
Code: |
//STEP01 EXEC PGM=SYNCSORT
//SORTIN DD DSN=E0421T.E0421SA1.STIEXT.CON.Z1010220.W10.KK,DISP=SHR
//SORTOUT DD DSN=E0421T.E0421SA1.STIEXT.CON.Z1010220.W10.KK2,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,5),RLSE),
// DCB=(RECFM=VB,LRECL=26742,BLKSIZE=27998),
// UNIT=SMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,2302,2303:2303,36,2339:2339,24404)
/* |
And getting the following error
Code: |
WER244A OUTREC - SHORT RECORD |
|
|
Back to top |
|
|
star_dhruv2000
New User
Joined: 03 Nov 2006 Posts: 87 Location: Plymouth, MN USA
|
|
|
|
How about:
Code: |
OUTREC FIELDS=(5:5,2302,2303:36X) |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Did you look up the WER244A message in the documentation? This should be the first place to look. . .
Quote: |
WER244A [ddname] {INREC,OUTREC} SHORT RECORD
EXPLANATION: The ddname will be SORTOUT, SORTOFxx,
SORTOFx or the ddname provided by an OUTFIL FNAMES parameter.
A variable-length record was too short to contain all the fields specified
on the control statement. Program HISTOGRM may be used to determine
the length of the shortest record in the input file. |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Kamlesh Kamal,
The message indicates that, you have at least one short record in your input file. In order to find the actual length of the short record/records and the count of it, run the HISTOGRM utility as suggested in the error message and you need to decide on what to do with the shorter records. If there are records shorter than 2303, say 2000, it may not make any sense overlaying 36 spaces at 2303rd position.
If you don't need to update shorter records, you can add an OUTFIL IFTHEN clause to make sure you're updating records which are of enough length like this.
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFHEN=(WHEN=(1,2,BI,GE,2338),BUILD=(1,2302,36X,2339))
/* |
|
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
You can also code the following:
Code: |
OUTREC OVERLAY=(2303:36X) |
|
|
Back to top |
|
|
|