View previous topic :: View next topic
|
Author |
Message |
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
Hi all
I need to copy from a QSAM file to VSAM file. My data is given in the attachment. I get MAXCC=12 and the message log says
ACTION ERROR ON (file name)
RECORD OUT OF SEQUENCE - KEY FOLLOWS :
000000 F2F8F8F6 F2F9F9E2 F0
Can anyone tell me how to solve this
Cheers
Shri |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You need to sort the data on the VSAM key before loading it into the file. |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
but my data is already in sorted order only sire...
eg
cusno billnum
2890 100
2899 201
2899 202
2899 203
can u please help me out?? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What is the key position and length of the VSAm file, and did you sort your flat file on exactly the same position and length.
Please show us your VSAM cluster definition.
Is the cluster an extended facilities VSAM cluster. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Shrimathi Krishnan wrote: |
but my data is already in sorted order |
Then how do you explain
Quote: |
RECORD OUT OF SEQUENCE |
|
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
can you post the Cluster defination and QSAM file data upto the length of the key of cluster |
|
Back to top |
|
|
ramfrom84
New User
Joined: 23 Aug 2006 Posts: 93 Location: chennai
|
|
|
|
Better option u can edit ur vsam file and put Hex on and find the Error record It may be duplicate key field or improper key.VSAM File we support for 12 error records after that it show abend.
Error record is give below
Code: |
000000 F2F8F8F6 F2F9F9E2 F0
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
Better option u can edit ur vsam file and put Hex on |
BUT ........... only if you have a pay for product to allow VSAM edit from TSO. |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
HI
I sorted the sortin qsam file with the same keys and then tried to sort into vsam file. Got
008(08)
Explanation for this error is :
You attempted to store a record with a Duplicate Key, or there
is a duplicate record for an alternate index with the unique
key option.
The copy book structure is :
Cusnok3
Cusno
Cusnok1
sttnum
keydte
Cusnok2
ownerid
Am i clear??
So what shall i do now? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Are you loading an empty cluster or adding records to an already populated cluster ?
If this is an empty cluster - please supply the information asked for below.
Well, I suppose I could once more ask you to post your cluster definition. Or at least ask that you tell me the key position and length.
Also your sort code will help too. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Re-run your sort eliminating duplicates. |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
//JS01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=XXXX.TYYY.IN1
// DISP=SHR
//SORTOUT DD DSN=XXXX.TYYY.OUT1,
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(1,1),RLSE),
// DCB=*.SORTIN
//XSUM DD DSN=XXXX.TYYY.OUT2
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(1,1),RLSE),
// DCB=*.SORTIN
//SYSIN DD *
SORT FIELDS=(9,19,CH,A,28,4,BI,A)
SUM FIELDS=NONE,XSUM
I EXECUTED THIS JCL.. IT GAVE ME JCL ERROR 16 AND THE XSUM FIEL WAS EMPTY
I tried to sort my qsam file with the same keys and then tried sorting it to
vsam file.... then i got 'VSAM LOGICAL ERROR 08 ON OUTPUT
'
Please suggest me some step... |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
My copy book is
FIELD
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END LENGTH
CUSNO01 1 66 66
3 CUSNOK3 GROUP 1 1 31 31
5 CUSNO X(7) 2 1 7 7
5 CUSNOTPE X 3 8 8 1
5 CUSNOK1 GROUP 4 9 31 23
7 STTNO X(19) 5 9 27 19
7 KEYDTE S9(9) 6 28 31 4
3 STTDTE S9(9) 7 32 35 4
3 ENDNO X(19) 8 36 54 19
3 STPDTE S9(9) 9 55 58 4
3 STPDTE-NO-END-FLAG REDEFINES STPDTE
3 STPDTE-NO-END-FLAG X(4) 10 55 58 4
3 PRDCMP XX 11 59 60 2
3 CUSNOK2 GROUP 12 61 64 4
5 OWNERID S9(9) 13 61 64 4
3 SECUREIND X 14 65 65 1
3 RATTPE X 15 66 66 1 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Are you loading an empty cluster or adding records to an already populated cluster ?
If this is an empty cluster - please supply the information asked for below.
Well, I suppose I could once more ask you to post your cluster definition. Or at least ask that you tell me the key position and length. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
if You want advice on solving your problem You should post the requested information:
"THE VSAM CLUSTER IDCAMS DEFINE STATEMENT"
the records You posted appear to be in sequence, but the UNIQUE key is 4+3 bytes long;
if You used a 4 bytes vsam key then You are going to have duplicate records and hence the error .....
regards |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
Cluster definition
Data Component Information:
Device type: 3390
Organization: KSDS
KSDS key length: 23
KSDS key location: 8
Average record size: 66
Maximum record size: 66
Allocated Space: Unit Primary Secondary
Data: CYLINDERS 40 4
Index: TRACKS 15 15
Dataset Date Information:
Creation date: 2007/05/18
Expiration date:
Modification date: 2007/05/18
Modification time: 07:52 AM GMT
Current Allocations in Tracks:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current Allocations in Tracks: Current Utilization in Tracks:
Allocated space: 600 Used data space: 1 ( 0 %)
Allocated extents: 1 Used extents: 1 ( 100 %)
Allocation type: UNIQUE Prime records: 12
KSDS Index Allocation in Tracks: Deleted records: 0
Allocated space: 15 Inserted records: 0
Number of records: 1 Updated records: 0
- - - - - - - - - - - Current Reorganization Information - - - - - - - - - - -
Data - Control Area Information: Control Interval Information:
Physical record size: 18432 Size-data: 18432 Index: 1024
Records per track: 3 Number CIs/CA: 45
Tracks per CA: 15 Number free CIs/CA: 0
Retrieved records: 0 Percent free CIs/CA: 0
Max record number 0 Percent free bytes/CI: 0
Number CA splits: 0 Number CI splits: 0 |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What is the recfm of the input file? |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
My copy book is
FIELD
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END LENGTH
CUSNO01 1 66 66
3 CUSNOK3 GROUP 1 1 31 31
5 CUSNO X(7) 2 1 7 7
5 CUSNOTPE X 3 8 8 1
5 CUSNOK1 GROUP 4 9 31 23
7 STTNO X(19) 5 9 27 19
7 KEYDTE S9(9) 6 28 31 4
3 STTDTE S9(9) 7 32 35 4
3 ENDNO X(19) 8 36 54 19
3 STPDTE S9(9) 9 55 58 4
3 STPDTE-NO-END-FLAG REDEFINES STPDTE
3 STPDTE-NO-END-FLAG X(4) 10 55 58 4
3 PRDCMP XX 11 59 60 2
3 CUSNOK2 GROUP 12 61 64 4
5 OWNERID S9(9) 13 61 64 4
3 SECUREIND X 14 65 65 1
3 RATTPE X 15 66 66 1 |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
William Thompson wrote: |
What is the recfm of the input file? |
Variable or fixed? |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
fixed block sire.. recl=66 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
KSDS key length: 23
KSDS key location: 8 |
This isn't LISTCAT - probably fileaid. Is the key location shown an offset or true position.
Also, back in the dark and distant past I recall when an extended facilities KSDS was defined the same problem ocurred, and was fixed by increasing the length of the VSAM definition by 4. Maybe worth trying with a 70 70 definition. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Shrimathi Krishnan wrote: |
fixed block sire.. recl=66 |
How can you prove this?
What was the sort message number that preceded this error:
RECORD OUT OF SEQUENCE - KEY FOLLOWS :
000000 F2F8F8F6 F2F9F9E2 F0
What does the above number represent, it is only nine bytes long?
What does the following represent:
cusno billnum
2890 100
2899 201
2899 202
2899 203
The above does not coincide to the VSAM key or the sorted fields of STTNO and KEYDTE?
SORT FIELDS=(9,19,CH,A,28,4,BI,A)
CUSNO01 1 66 66
3 CUSNOK3 GROUP
5 CUSNO X(7)
5 CUSNOTPE X
5 CUSNOK1 GROUP
7 STTNO X(19)
7 KEYDTE S9(9) comp
KSDS key length: 23
KSDS key location: 8 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Your sort fields do not look at all like your sample data |
|
Back to top |
|
|
Shrimathi Krishnan
New User
Joined: 19 Apr 2007 Posts: 39 Location: Chennai
|
|
|
|
Hi all
Thanks a lot for all ur time and suggestions. As suggested i checked again with the sort fields and also made a change in the VSAM cluster definition. I got the desired output..
Once again thanks a lot to all of you.... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
|