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

SYNCSORT OMIT condition execution error


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

New User


Joined: 19 Dec 2007
Posts: 6
Location: Pune

PostPosted: Wed Sep 10, 2008 5:38 pm
Reply with quote

Hi,
I am trying to give the following condition while using syncsort

SORT FIELDS=COPY
OMIT COND=(142,2,CH,EQ,C'07')

However I am getting an user abend U0016 and joblog is giving below message

INSERT 0, DELETE 0
INCLUDE/OMIT FIELD BEYOND RECORD
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Can anyone please help me to figure this out.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 10, 2008 5:39 pm
Reply with quote

What are the file attributes for SORTIN
Back to top
View user's profile Send private message
unmesh33

New User


Joined: 19 Dec 2007
Posts: 6
Location: Pune

PostPosted: Wed Sep 10, 2008 6:54 pm
Reply with quote

Hi,
Below are the file attributes.

Organization . . . : PS
Record format . . . : VB
Record length . . . : 2472
Block size . . . . : 27998

Please let me know if you required any more information.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Sep 10, 2008 7:05 pm
Reply with quote

Are there any options in SYNCSORT to allow for the fact that some records may be shorter than the position of the compare field, as DFSORT has

OPTION VLSCMP VLSHRT
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Sep 10, 2008 8:44 pm
Reply with quote

Hello,

There may be something useful here (near the end of the second page):
ibmmainframes.com/viewtopic.php?t=18206
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 11, 2008 12:42 am
Reply with quote

Hi,

per me, this
Code:
INCLUDE/OMIT FIELD BEYOND RECORD
is the main error, are you sure the file used in JCL, which was abended, has the LRECL=2472 ? it's confusing..probablly i won't agree. it must be less than 142.
Back to top
View user's profile Send private message
harinadh

New User


Joined: 01 Sep 2004
Posts: 18

PostPosted: Thu Sep 11, 2008 1:53 am
Reply with quote

CAN U TRY USING OMIT COND WITH 146 POSITION INSTEAD OF 142 POSITION.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Sep 11, 2008 2:42 am
Reply with quote

Hello,

I believe this is going far away from the actual problem. . .

The most likely cause is the first short record in the vb file.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Sep 11, 2008 11:30 am
Reply with quote

I think that the OP has worked it out now, but can not be asked to return to the forum.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 11, 2008 10:29 pm
Reply with quote

harinadh wrote:
CAN U TRY USING OMIT COND WITH 146 POSITION INSTEAD OF 142 POSITION.
Unless we are sure about the LRECL..Including 4 for RDW would not make any difference in the output..
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 11, 2008 10:35 pm
Reply with quote

Hi Dick,
dick scherrer wrote:
The most likely cause is the first short record in the vb file.
Unless i misunderstood..I doubt this would create any problem, if record is short it would not qualify for the criteria of OMIT COND & would not be selected for the output..
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Sep 11, 2008 11:27 pm
Reply with quote

Hi Anuj,

Quote:
if record is short it would not qualify for the criteria of OMIT COND & would not be selected for the output..
I believe not. . .

If the record is short, it will cause the "INCLUDE/OMIT FIELD BEYOND RECORD" error. The compare will fail as it is beyond the end of the record. Unless it is provided for. . . See the link above.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Sep 12, 2008 12:34 am
Reply with quote

Dick,

I used the below JCL:
Code:
//STEP120 EXEC PGM=SORT,               
//             REGION=1024K           
//SORTIN   DD  DSN=HLQ.FIRST.FILE.VB, 
//             DISP=SHR               
//SORTOUT  DD  SYSOUT=*               
//*                                   
//SYSOUT   DD  SYSOUT=*               
//SYSPRINT DD  SYSOUT=*               
//*                                   
//SYSIN    DD  *                       
    OPTION COPY                       
    INCLUDE COND=(29,01,CH,EQ,C'A')   
//*                                   

contents of HLQ.FIRST.FILE.VB are:
Code:
111 A$$$$345   
222 AAAAA12324
444 FFFFF455   
555 GGGGG1     
888 CCCCC12   

with the RDW statistics
Code:
  16 |111 A$$$$345 
  18 |222 AAAAA12324
  16 |444 FFFFF455 
  14 |555 GGGGG1   
  15 |888 CCCCC12   
LRECL is 80.

JOB was ended with successful completion,RC=0 & there was no record in the output.

In the above JOB when control card was changed to:
Code:
//SYSIN    DD  *               
    OPTION COPY                 
    OMIT COND=(89,01,CH,EQ,C'A')
it was abended with
Code:
WER250A  INCLUDE/OMIT FIELD BEYOND RECORD
while same JOB give this output:
Code:
444 FFFFF455
555 GGGGG1   
888 CCCCC12 
when this
Code:
//SYSIN    DD  *                 
    OPTION COPY                 
    OMIT COND=(9,01,CH,EQ,C'A') 
control card was used.

Please advise.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Sep 12, 2008 1:06 am
Reply with quote

Hi Anuj,

Your Syncsort environment has been set up to automatically handle short records.

Not every system is. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Sep 12, 2008 2:10 am
Reply with quote

hmmm.. these shop specific things are going to kill me some day..
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Sep 15, 2008 2:14 pm
Reply with quote

Anuj,

Just thought of sharing some info. I tried executing exactly the same jcl and input records as yours, but failed with RC=16 showing the below error.
Code:
WER250A  INCLUDE/OMIT FIELD BEYOND RECORD

and the same job went thru fine with RC=0 giving when I modified the card as
Code:
//SYSIN    DD *                 
  OPTION COPY,VLSHRT             
  INCLUDE COND=(29,01,CH,EQ,C'A')

VLSHRT specifies that records that are too short to contain all of the INCLUDE compare fields are not to be included in the output data set.
Though VLSHRT is a DFSORT option it works with Syncsort as well.

Alternatively, you can specify the VLTESTI parameter in SYNCSORT to handle short records in INCLUDE/OMIT as below.
Code:
//STEP01   EXEC PGM=SORT,PARM='VLTESTI=1'


The delivered default of 0 instructs SyncSort to terminate if a record does not completely contain all INCLUDE or OMIT fields. A WER250A critical error message is generated to indicate this condition.

When VLTESTI=1 is specified, a record that does not completely contain all INCLUDE/OMIT fields is treated as having failed the comparison. SyncSort will omit the record if INCLUDE is being used or include the record if OMIT has been specified.

When VLTESTI=2 is specified, SyncSort will treat comparisons to fields not completely contained within the record as false and decide a record’s status for inclusion or omission from fields that are available. If all fields are not present, the record will be processed as having failed the comparison. SyncSort will omit the record if INCLUDE is being used or include the record if OMIT has been specified.

Thanks,
Arun
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 Error to read log with rexx CLIST & REXX 11
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Error when install DB2 DB2 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top