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

SYNCSORT Error - CONTROL FIELD BEYOND RECORD


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arunn

New User


Joined: 03 Sep 2010
Posts: 15
Location: Bengaluru

PostPosted: Sun Oct 04, 2020 4:10 pm
Reply with quote

Re-posting as the previous post was posted in a non-syncsort forum. Apologies if it seems a duplicate.


I have a unique problem with how syncsort is working. My shop uses 2 mainframe environments - one runs on OS390 while other runs on Z/os 2 .
The job which performs sort and so far seems to be working perfectly in one mainframe system however the same job with same code is giving an error in different environment. The only visible difference i see is with the Syncsort for Z/os Version.
Below is the code snippet. Trying to understand what might possibly be wrong/incompatible here.

Log from the Code that works ----

Code:
SYNCSORT FOR Z/OS  2.1.4.1R
SYSIN :                                                             
 SORT FIELDS=(13,31,A,211,27,A,5,7,A),FORMAT=BI                     
                   
WER108I  SORTIN   : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998       
WER073I  SORTIN   : DSNAME=INPUT.DATASET
WER110I  SORTOUT  : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998       
WER074I  SORTOUT  : DSNAME=OUTPUT.DATASET
           
WER036B  G=1155                                                     
WER147I  CONTROL FIELD GREATER THAN RECORD LENGTH, POSSIBLE OUT OF SEQUENCE RECORD
WER177I  TURNAROUND SORT PERFORMED




Log from the same code in a different Mainframe environment that's failing.


Code:
SYNCSORT FOR Z/OS  2.1.0.0R
SYSIN :                                                                       
 SORT FIELDS=(13,31,A,211,27,A,5,7,A),FORMAT=BI                               
                 
WER108I  SORTIN   : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998                 
WER073I  SORTIN   : DSNAME=INPUT.DATASET
WER110I  SORTOUT  : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998                 
WER074I  SORTOUT  : DSNAME=OUTPUT.DATASET
WER462I  OUTPUT LRECL DIFFERS FROM SORTOUT LRECL                               
                   
WER036B  G=633                                                                 
WER027A  CONTROL FIELD BEYOND RECORD



Be Safe,
Thanks.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Sun Oct 04, 2020 6:39 pm
Reply with quote

Your input records do have format VB, and you have got a particular one with LRECL<238 - hence your sort fields fell outside of the record field.

First of all, you need to decide: what to do with those short records? When decided, various solutions can be found to implement.
Back to top
View user's profile Send private message
arunn

New User


Joined: 03 Sep 2010
Posts: 15
Location: Bengaluru

PostPosted: Sun Oct 04, 2020 7:17 pm
Reply with quote

There was an mistake in copying the output of the errored part - Posting the correct one here as not able to edit the one earlier and also the SORT step.

Code:
//*                                                             
//SORT     EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DSN=INPUT.DATASET,DISP=SHR    <<<< LRECL=654,RECFM=VB     
//SORTOUT  DD DSN=OUTPUT.DATASET,
//            DISP=(NEW,CATLG,DELETE),                           
//            SPACE=(CYL,(10,10),RLSE),                         
//            LRECL=654,RECFM=VB                                 
//SYSIN    DD *                                                 
 SORT FIELDS=(13,31,A,211,27,A,5,7,A),FORMAT=BI                 
//* 


Log from the successful run.
Code:
SYNCSORT FOR Z/OS  2.1.4.1R
SYSIN :                                                             
 SORT FIELDS=(13,31,A,211,27,A,5,7,A),FORMAT=BI                     
                   
WER108I  SORTIN   : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998       
WER073I  SORTIN   : DSNAME=INPUT.DATASET
WER110I  SORTOUT  : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998       
WER074I  SORTOUT  : DSNAME=OUTPUT.DATASET
           
WER036B  G=1155                                                     
WER147I  CONTROL FIELD GREATER THAN RECORD LENGTH, POSSIBLE OUT OF SEQUENCE RECORD
WER177I  TURNAROUND SORT PERFORMED


Log from the same code in a different Mainframe environment that's failing.
Code:
SYNCSORT FOR Z/OS  2.1.0.0R
SYSIN :                                                                       
 SORT FIELDS=(13,31,A,211,27,A,5,7,A),FORMAT=BI                               
                 
WER108I  SORTIN   : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998                 
WER073I  SORTIN   : DSNAME=INPUT.DATASET
WER110I  SORTOUT  : RECFM=VB   ; LRECL=   654; BLKSIZE= 27998                 
WER074I  SORTOUT  : DSNAME=OUTPUT.DATASET
                                                         
WER036B  G=633                                                                                                       
WER027A  CONTROL FIELD BEYOND RECORD 


The record length of the input and output file being created is 654. No changes being done there on the length. I am confused about why its working in one environment and not the other?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Sun Oct 04, 2020 7:22 pm
Reply with quote

I guess, you seriously need to RTFM.

With RECFM=VB, LRECL=654 each particular record can have any LRECL, between 4 and 654 bytes. Whenever your particular specific record is shorter than 238, you get the error you mentioned.

Again: RTFM, RTFM, and RTFM!!!

P.S.
Maybe, your different environments do have different SORT default options established, to ignore specific situations with records.
Anyway, you need to understand well all those details, starting from understanding LRECL when RECFM=VB...
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Sun Oct 04, 2020 11:23 pm
Reply with quote

If you read carefully the explanation of WER147W message (can you?) then you would easily find that SORT parameter VLTEST causes different behavior of the utility in those your two environments.

Why you are not able to read the manual before starting your screaming at the forum? Do you speak English?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Sun Oct 04, 2020 11:34 pm
Reply with quote

Try
Code:
OPTION COPY, VLSHRT

Besides, Syncsort releases don’t look the same and in one you already have a warning and in second that warning turned into an error. The error one looks to be the older version of the synsort.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Sun Oct 04, 2020 11:46 pm
Reply with quote

Rohit Umarjikar wrote:
Try
Code:
OPTION COPY, VLSHRT


VLSHRT is an option for DFSORT utility, not for SYNCSORT.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Mon Oct 05, 2020 3:41 am
Reply with quote

From the manual:
Code:
VLTEST=(n/ 1 , ON /OFF /OFF4)  -> Indicates the type of validity testing to be done when processing variable-length records.

VLTESTI=n/ 0                   -> Indicates action to be taken when a variable-length record does not contain all fields referenced by INCLUDE or OMIT processing.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Mon Oct 05, 2020 4:15 am
Reply with quote

Joerg.Findeisen wrote:
From the manual:
Code:
VLTEST=(n/ 1 , ON /OFF /OFF4)  -> Indicates the type of validity testing to be done when processing variable-length records.

VLTESTI=n/ 0                   -> Indicates action to be taken when a variable-length record does not contain all fields referenced by INCLUDE or OMIT processing.

If TS is not able to RTFM, then it is useless to quote the manual at the forum... 12.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue Oct 06, 2020 3:47 am
Reply with quote

sergeyken wrote:
Rohit Umarjikar wrote:
Try
Code:
OPTION COPY, VLSHRT


VLSHRT is an option for DFSORT utility, not for SYNCSORT.

That's correct.
If I remember VLTEST=1 is the default and equivalent of VLSHRT in DFSORT. So in SYNCSORT , if you provide VLSHRT then internally it will convert to VLTEST equivalent instead of a syntax error.
If TS make a use of PARM VLSTEST=1 then error should go away and on the side can as well try for OPTION COPY,VLSHRT.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Tue Oct 06, 2020 5:18 am
Reply with quote

Rohit Umarjikar wrote:
sergeyken wrote:
Rohit Umarjikar wrote:
Try
Code:
OPTION COPY, VLSHRT


VLSHRT is an option for DFSORT utility, not for SYNCSORT.

That's correct.
If I remember VLTEST=1 is the default and equivalent of VLSHRT in DFSORT. So in SYNCSORT , if you provide VLSHRT then internally it will convert to VLTEST equivalent instead of a syntax error.
If TS make a use of PARM VLSTEST=1 then error should go away and on the side can as well try for OPTION COPY,VLSHRT.

The printed explanation of WER147I message clearly points to VLTEST parameter. The only thing the TS needs to do is, read the manual about this message found in his own log. Plus:<deleted by mod>
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top