View previous topic :: View next topic
|
Author |
Message |
unmesh33
New User
Joined: 19 Dec 2007 Posts: 6 Location: Pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What are the file attributes for SORTIN |
|
Back to top |
|
|
unmesh33
New User
Joined: 19 Dec 2007 Posts: 6 Location: Pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
harinadh
New User
Joined: 01 Sep 2004 Posts: 18
|
|
|
|
CAN U TRY USING OMIT COND WITH 146 POSITION INSTEAD OF 142 POSITION. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I think that the OP has worked it out now, but can not be asked to return to the forum. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Anuj,
Your Syncsort environment has been set up to automatically handle short records.
Not every system is. . . |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
hmmm.. these shop specific things are going to kill me some day.. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
|