Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy QSAM to VSAM using IDCAMS: RECORD OUT OF SEQUENCE ERROR
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Thu May 17, 2007 1:31 pm    Post subject: Copy QSAM to VSAM using IDCAMS: RECORD OUT OF SEQUENCE ERROR
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 17, 2007 3:08 pm    Post subject:
Reply with quote

You need to sort the data on the VSAM key before loading it into the file.
Back to top
View user's profile Send private message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Thu May 17, 2007 4:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 17, 2007 4:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu May 17, 2007 4:29 pm    Post subject:
Reply with quote

Shrimathi Krishnan wrote:
but my data is already in sorted order
Then how do you explain
Quote:
RECORD OUT OF SEQUENCE
icon_question.gif
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Thu May 17, 2007 4:43 pm    Post subject:
Reply with quote

can you post the Cluster defination and QSAM file data upto the length of the key of cluster
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Thu May 17, 2007 5:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 17, 2007 5:50 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Thu May 17, 2007 6:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 17, 2007 6:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri May 18, 2007 12:38 am    Post subject:
Reply with quote

Hello,

Re-run your sort eliminating duplicates.
Back to top
View user's profile Send private message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Fri May 18, 2007 11:28 am    Post subject: Re: Copy QSAM to VSAM using IDCAMS: RECORD OUT OF SEQUENCE E
Reply with quote

//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
View user's profile Send private message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Fri May 18, 2007 11:31 am    Post subject: Re: Copy QSAM to VSAM using IDCAMS: RECORD OUT OF SEQUENCE E
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 18, 2007 12:02 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri May 18, 2007 12:03 pm    Post subject: Re: Copy QSAM to VSAM using IDCAMS: RECORD OUT OF SEQUENCE E
Reply with quote

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
View user's profile Send private message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Fri May 18, 2007 1:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri May 18, 2007 2:25 pm    Post subject:
Reply with quote

What is the recfm of the input file?
Back to top
View user's profile Send private message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Fri May 18, 2007 2:29 pm    Post subject: Re: Copy QSAM to VSAM using IDCAMS: RECORD OUT OF SEQUENCE E
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri May 18, 2007 2:33 pm    Post subject:
Reply with quote

William Thompson wrote:
What is the recfm of the input file?
Variable or fixed?
Back to top
View user's profile Send private message
Shrimathi Krishnan

New User


Joined: 19 Apr 2007
Posts: 39
Location: Chennai

PostPosted: Fri May 18, 2007 3:11 pm    Post subject:
Reply with quote

fixed block sire.. recl=66
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us