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 fo variable length files.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort fo variable length files.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Fri Jun 24, 2011 9:45 pm    Post subject: Reply to: Syncsort fo variable length files.
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 Moderator


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

PostPosted: Fri Jun 24, 2011 10:44 pm    Post subject:
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    Post subject: Reply to: Syncsort fo variable length files.
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: 1002
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Jun 27, 2011 11:36 am    Post subject:
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    Post subject: Reply to: Syncsort fo variable length files.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Tue Jun 28, 2011 9:42 am    Post subject: Reply to: Syncsort fo variable length files.
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    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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm

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