View previous topic :: :: View next topic
|
Author |
Message |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
Hi All,
We have VSAM KSDS file defined with below attributes:-
Code: |
DELETE XXXXX.XX.XXXX.XXXXXXX -
PURGE -
CLUSTER
DEFINE CLUSTER (NAME(XXXXX.XX.XXXX.XXXXXXX) -
VOLUMES(* * * * *) -
FREESPACE(20,20) -
UNIQUE -
INDEXED -
CYLINDERS(30,10) -
KEYS(14 1) -
RECORDSIZE(106 106) -
SHAREOPTIONS(3 3)) -
DATA ( -
NAME(XXXXX.XX.XXXX.XXXXXXX.DATA) CISZ(4096) ) -
INDEX ( -
NAME(XXXXX.XX.XXXX.XXXXXXX.INDEX) CISZ(2048) )
|
Production job is abending with below information while copying data from this VSAM fle to flat file using IDCAMS. I am thinking that this might be related to duplicate records in the VSAM file and may be thats the reason we might be getting RECORD OUT OF SEQUENCE error message. But VSAM KSDS file should not have duplicate record. rite?. How is this possible? I am confused.
Error message from SYSPRINT:--
Code: |
IDCAMS SYSTEM SERVICES TIME: 04:03:38
REPRO INFILE(DD1) -
OUTFILE(DD2) -
REPLACE
IDC3302I ACTION ERROR ON XXXXX.XX.XXXX.XXXXXXX
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000 F0F0F0F0 F0F5F1F4 F6F2F3F0 F9F0
IDC3302I ACTION ERROR ON XXXXX.XX.XXXX.XXXXXXX
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000 F0F0F0F0 F0F5F1F4 F3F8F2F3 F1F7
IDC0005I NUMBER OF RECORDS PROCESSED WAS 199784
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 8
|
Please note that file is already in sorted order.
As a temparory fix we are sorting the DATA component file by removing duplicate record and using this o/p file for further processing. But my question how duplicate records are getting inserted.
Note: This VSAM file is being used in 2 different CICS regions. But even in that case VSAM will handle duplicate condition as per my understanding or is this the reason for the issue?
Please advice..
Regards,
Chetan |
|
Back to top |
|
 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8787 Location: Welsh Wales
|
|
|
|
KSDS = unique key, therefor any duplicate keys cause the problem. |
|
Back to top |
|
 |
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2470 Location: Netherlands, Amstelveen
|
|
|
|
F0F0F0F0 F0F5F1F4 F6F2F3F0 F9F0
0000 0514 6230 90
F0F0F0F0 F0F5F1F4 F3F8F2F3 F1F7
0000 0514 3823 17
For me that is out of sequence. |
|
Back to top |
|
 |
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8505 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I am thinking that this might be related to duplicate records in the VSAM file |
This is your first problem -- stop thinking and read the error message. It says the data is out of sequence, which merely means the data being presented is not in ascending sequence by the VSAM key. Nothing about that message indicates or implies that there is duplicate data -- just data out of sequence.
And I think if you really closely study the job, you will find that this error message is coming on the load of the VSAM file, not the unload. There would be no reason to use REPLACE on an unload of a VSAM file. |
|
Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8787 Location: Welsh Wales
|
|
|
|
Possibly a misconception regarding the definition of the KSDS key, using offset against actual  |
|
Back to top |
|
 |
Anuj Dhawan
Senior Member
Joined: 22 Apr 2006 Posts: 6254 Location: Mumbai, India
|
|
|
|
Your interpretation does not seem correct. This
Quote: |
Production job is abending with below information while copying data from this VSAM fle to flat file using IDCAMS. |
won't give you the error you show. For QSAM file, in this context, key-sequence does not even matter. Are you sure it's not for Load step, as Robert has also indicated. |
|
Back to top |
|
 |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
Peter,
There are number of records between those 2 records which you have mentioned. How it will create out of sequence only for these 2 records? What about other records in between?
Anuj / Robert,
I am also getting duplicate error message sometimes. So got confused while posting. I will post about duplicate detail as well later. As of now i am concerned about out of sequence error.
This is unload step where I am copying from VSAM to flat file using IDCAMS. Please see the below step which is giving abend while unloading:-
Code: |
PS010 EXEC PGM=ADUT515,PARM=IDCAMS
SYSPRINT DD SYSOUT=&CLSJ
DD1 DD DSN=XXXXX.XX.XXXX.XXXXXXX,DISP=SHR
DD2 DD DSN=XXXXX.CA.XXXXXX.UNLOAD(+1),
DISP=(NEW,CATLG,DELETE),
UNIT=STOR,SPACE=(TRK,(1800,250),RLSE),
DCB=(B0.DSCB,RECFM=FB,LRECL=106,BLKSIZE=1060)
SYSIN DD *
REPRO INFILE(DD1) -
OUTFILE(DD2) -
REPLACE
|
My question: How to avoid this error abend. As I have told in previous message as a temparory fix we sorting using data component which is not good programming.
Please let me know if you need any information. |
|
Back to top |
|
 |
Bill Woodger
DFSORT Moderator
Joined: 09 Mar 2011 Posts: 7312
|
|
|
|
Read what others have written to you in reply.
You cannot get that message by REPROing any VSAM file to a "flat"/QSAM/PS file,
Look at the error message.
Now, show the messages output from the step you have having a problem with. Unless your "wrapper" program is doing something, the step is NOT abending.
Why would you feel that the presence of intervening records would argue that the data you have shown is not out of sequence anyway.
I think you need to start again. Forget everything you "know" and look at outputs to understand what is happening. You certainly do know "know" which command is failing, |
|
Back to top |
|
 |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
Bill,
I am really getting that error message by REPROing VSAM to flat file. The IDCAMS step which I have shown above is from a production job itself. Sometimes job will run without any issues. and is abending only when there are out of sequence records. Could you please tell me where exactly I am wrong.
Expat,
what is misconception you are referring? I didnt understand.
Regards,
Chetan |
|
Back to top |
|
 |
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8505 Location: Dubuque, Iowa, USA
|
|
|
|
Are you running on a z/OS machine or something else like an AS/400? |
|
Back to top |
|
 |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
yes.. Its z/OS machine only.. |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19254 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you start over as your posts are confusing at best. . .
Why a REPLACE when creating an output sequential file?
Why mention duplicates, when the error is an out of sequence?
Suggest you use your sort product and copy the vasm data to a sequential file. Then look at this sequential file for the keys identified in the error. Look at the records immediately before and after the problem records. . .
Post what you find. |
|
Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8787 Location: Welsh Wales
|
|
|
|
It seems that you are not using NATIVE IDCAMS, what product are you actually using here where you need to specify IDCAMS as a parm value. |
|
Back to top |
|
 |
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 276 Location: Bang,iflex
|
|
|
|
I assume there may be one or morel steps involved in your job. This is 100% due to VSAM key is not in ascending order.
do a test as below
1. load VSAM file with sorted sequential file .
2. Then used IDCAMS repro VSAM file to any GDG dataset or flat dataset needed.
Also check your key should be KEY(14,0). Please note that unloading VSAM file to any flat file doesn't give sequence error or duplication error. |
|
Back to top |
|
 |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
expat,
Even with NATIVE IDCAMS also I am getting same error. That ADUT515 is just a utility which will use IDCAMS.
Yesterday, when I was getting out of sequence, I have sorted the file using data component and loaded that data to VSAM file using delete define command. Today same job abended with duplicate record error. Please see below:-
Code: |
IDCAMS SYSTEM SERVICES TIME: 00:52:20
REPRO INFILE(INFILE) OUTFILE(OUTFILE)
IDC3302I ACTION ERROR ON XXXXX.XX.XXXX.XXXXXXX
IDC3351I ** VSAM I/O RETURN CODE IS 156 - RPLFDBWD = X'2A08009C'
IDC3302I ACTION ERROR ON XXXXX.XX.XXXX.XXXXXXX
IDC3308I ** DUPLICATE RECORD - KEY FOLLOWS:
000000 F0F0F0F0 F0F5F1F5 F6F1F2F4 F9F8
IDC31467I MAXIMUM ERROR LIMIT REACHED.
IDC0005I NUMBER OF RECORDS PROCESSED WAS 202177
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
|
I tried to view the data in the VSAM file after the record 00000515612498 which is causing the issue. It is displaying data upto that issue record and if i hit 'FP8' to see next records I am getting 'LOGICAL VSAM ERROR' on top right corner.
I have referred IBM manuals on VSAM I/O RETURN CODE IS 156 and RPLFDBWD = X'2A08009C'. Its referring to INVALID CONTROL INTERVAL and they listed below posible reasons-->
1.A key is not greater than the previous key.
2.A key is not in the current control interval.
3.A spanned record RDF is encountered.
4.A freespace pointer is invalid.
5.The number of records does not match a group RDF record count.
I could not figure out which exactly is causing the issue. Please guide me.
And about out of sequence error:- When l get out of sequence error next time I will try without REPLACE option. But I am 100% sure that I am getting out of sequence error while copying from VSAM to flat file. I agree with you guys that we should not use REPLACE option while copying from VSAM to flat file (referred manuals on this).
Regards,
Chetan |
|
Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8787 Location: Welsh Wales
|
|
|
|
When you sort the file to remove duplicates, please show the sort card used in that job |
|
Back to top |
|
 |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
Vasanth,
Yes.. there are more steps in my job. This is what it doing:-
Step1: Copy VSAM fiel to flat file using REPRO.
Step2: Process the flat file and create o/p file out of it.
Step 3: Delete and Define the VSAM.
Step 4: Load data from o/p of step 2 to VSAM file using REPRO (with REPLACE option).
Regards,
Chetan |
|
Back to top |
|
 |
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2470 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
I have referred IBM manuals on VSAM I/O RETURN CODE IS 156 and RPLFDBWD = X'2A08009C'. Its referring to INVALID CONTROL INTERVAL and they listed below posible reasons-->
1.A key is not greater than the previous key.
2.A key is not in the current control interval.
3.A spanned record RDF is encountered.
4.A freespace pointer is invalid.
5.The number of records does not match a group RDF record count.
|
Do a VERIFY and try again. |
|
Back to top |
|
 |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
1. I have used data component to copy to flat file from VSAM (without REPLACE option):
This I have already posted in previous posts.
2. Using SYNCSORT removed duplicates from above file
Code: |
SYSIN :
SORT FIELDS=(2,14,CH,A)
SUM FIELDS=NONE,XSUM
|
3. Then loaded file without duplicates to VSAM
Peter,
File is already used by production job. I am trying to close file in production and do VERIFY. Hope it will not cause any problem. I will get back to you soon.
Thanks,
Chetan |
|
Back to top |
|
 |
chetanambi
New User
Joined: 21 Jan 2012 Posts: 58 Location: India
|
|
|
|
Peter,
Even VERIFY is throwing same duplicate error message. Please see below:-
Code: |
IDCAMS SYSTEM SERVICES TIME: 05:07:16
VERIFY DATASET(XXXXX.XX.XXXX.XXXXXXX)
IDC3302I ACTION ERROR ON XXXXX.XX.XXXX.XXXXXXX
IDC3351I ** VSAM I/O RETURN CODE IS 156 - RPLFDBWD = X'D708009C'
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
|
Please suggest me..
Thanks,
Chetan |
|
Back to top |
|
 |
|