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

Syncsort fo variable length files.


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

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Fri Jun 24, 2011 9:39 pm
Reply with quote

Hi,

I noticed this problem when i was sorting a variable length file.
My requirement is explained below.
Input file
Code:
01 DATA-ID              PIC  X(19).
01 EMP-ID                PIC X(5).
01 NAME                   
    05 TITLE                PIC X(30).
    05 FNAME              PIC X(30).
    05 MIDDLE-NAME   PIC X(30).
    05 SUR-NAME        PIC X(10).


Output file should be of below format
Code:
01 DATA-ID              PIC S9(18) COMP.
01 EMP-ID                PIC S9(5) COMP.
01 NAME                   
    05 TITLE              PIC X(30).
    05 FNAME            PIC X(30).
    05 MIDDLE-NAME PIC X(30).
    05 SUR-NAME      PIC X(30).

Both the files are of variable format with input length being

To achieve i used the below sort card

Code:
SORT FIELDS=COPY
         OUTREC FIELDS= (1,4,5:5,19,ZD,BI,13:24,5,ZD,BI,16:29,30,
                              46:59,30,76:89,30,106:119,10,20X)


Scenario 1: Input file with one record having data with last field SURNAME fully filled meaning positions 115 to 124 are filled.

Result: Job ran successfully.

Scenario 2: Input file with one record having data with SURNAME field having data from position 115 to 119.

Result: Job Failed with
Code:
WER244A OUTREC SHORT RECORD ERROR.


Can anyone explain what happened here...?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 24, 2011 9:45 pm
Reply with quote

Quote:
Can anyone explain what happened here...?


an input record was too short to contain all the fields used to build he output record !
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jun 24, 2011 10:44 pm
Reply with quote

Quote:
Can anyone explain what happened here...?


Hopefully, if you looked up that message in the appropriate message manual, it would explain what happened. That's what messages and message manuals are for! icon_rolleyes.gif
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sat Jun 25, 2011 10:39 am
Reply with quote

Thanks Frank. I looked up in the manual and got the same message and was advised to use VLFILL parameter which i did and job ran successfully.
But my question is even though in both the scenarios input files are of same format and same length, it failed in second scenario due to last field not having its every byte filled even when other fields are not completely filled(in both scenarios).
Is this SHORT RECORD error comes only when the input file's last field is not having its every bytes filled?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Jun 27, 2011 11:36 am
Reply with quote

Quote:
Is this SHORT RECORD error comes only when the input file's last field is not having its every bytes filled?

No. The short record error will happen whenever the input record isn't long enough to provide a field to move to output. It doesn't matter whether the last field is not filled - the 2nd last field could be short of missing missing....

Garry.
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Tue Jun 28, 2011 7:05 am
Reply with quote

Thanks Gary for your information. As my input file is also of Variable Length the only way to overcome this error is to use VLFILL parameter or is there any other way...?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 28, 2011 9:42 am
Reply with quote

Quote:
... is to use VLFILL parameter or is there any other way...?


since that is the proper way, be satisfied with it
no reason for us to waste time searching for alternatives icon_evil.gif
naturally you are free to use your time for that icon_cool.gif
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top