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

SYNCSORT REQUIREMENT - VARIABLE LENGTH FILE


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

New User


Joined: 16 May 2008
Posts: 36
Location: Kolkata,India

PostPosted: Sat Oct 30, 2010 12:37 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Oct 30, 2010 1:03 am
Reply with quote

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
View user's profile Send private message
Kamlesh Kamal

New User


Joined: 16 May 2008
Posts: 36
Location: Kolkata,India

PostPosted: Sat Oct 30, 2010 1:07 am
Reply with quote

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
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Sat Oct 30, 2010 2:23 am
Reply with quote

How about:

Code:
OUTREC FIELDS=(5:5,2302,2303:36X)
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: Sat Oct 30, 2010 2:27 am
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 01, 2010 3:26 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Nov 02, 2010 10:13 pm
Reply with quote

You can also code the following:
Code:
  OUTREC OVERLAY=(2303:36X)
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 Binary File format getting change whi... All Other Mainframe Topics 5
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top