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
 

 

SYNCSORT REQUIREMENT - VARIABLE LENGTH FILE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SYNCSORT REQUIREMENT - VARIABLE LENGTH FILE
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

Site Director


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

PostPosted: Sat Oct 30, 2010 1:03 am    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sat Oct 30, 2010 2:27 am    Post subject:
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: 2276
Location: @my desk

PostPosted: Mon Nov 01, 2010 3:26 pm    Post subject:
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: 500
Location: USA

PostPosted: Tue Nov 02, 2010 10:13 pm    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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