Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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 File Aid tool to compare numeric data balaji81_k DFSORT/ICETOOL 0 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us