View previous topic :: View next topic
|
Author |
Message |
Narismha
New User
Joined: 22 Nov 2006 Posts: 23 Location: Mumbai
|
|
|
|
Hi,
I have a flat file and first four bytes occupies s9(9) comp. I would like to create one vsam file for the above file with first 4bytes as key.
I have sorted the flat file SORT FIELDS=(1,4,BI,A) , after that i have generated the cluster and tried to copy that flat file to Vsam and its giving Key out of sequence.
My Cluster def:
DEFINE CLUSTER -
(NAME (XXXXXXX.YYYYY.ZZZZ.VSAM1) -
CYLINDERS(50,50) -
CISZ (2048) -
FSPC (5,10) -
KEYS(4,0) -
RECORDSIZE(102,102) -
) -
DATA -
(NAME(XXXXXXX.YYYYY.ZZZZ.VSAM1.DATA)) -
INDEX -
(NAME(XXXXXXX.YYYYY.ZZZZ.VSAM1.INDEX) -
CISZ (3072) -
)
Please help me how to resolve this.
Thanks
-Narisimha |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I think I know where the problem is, how are you loading the dataset when you get the key out of sequence? |
|
Back to top |
|
|
Narismha
New User
Joined: 22 Nov 2006 Posts: 23 Location: Mumbai
|
|
|
|
Hi,
I am unable to create the VSAM file(loading the data set). That is what my problem is.
Let me explain my process:
Step1> Sort the flat file ( Rec len 102 and first 4 bytes are s9(9) comp)
SORT FIELDS=(1,4,BI,A) ?? is this correct???
Step2> Define cluster ( Please check the previous mail)
Step3> Repro from INDD(sorted flat file) to OUTDD(VSAM file)
This step is running with MAxcc=12 and it tells rec-out-of-seq.
Please let me know if you need more information.
Thanks
-Narisimha |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please try SORT FIELDS=(1,4,CH,A). |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I was thinking that too, but a BI is unsigned binary, wouldn't the sign bit act like an extra bit and instead of making negitive it would make even bigger? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
The "pic" is s9(9) comp. A -1 in that field will be FFFFFFFF. It stores the complement rather than the numeric value with the high order bit turned on.
It would be good if we could see the "keys" at the point where the load fails, but i'd still try the CH instead of the BI. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Thinking along those lines except the poster sorted and loaded without cobol.... |
|
Back to top |
|
|
punith007 Warnings : 1 New User
Joined: 16 May 2006 Posts: 11 Location: INDIA
|
|
|
|
Hi all,
Is that the above out-of-seq problem arises due to the fact that the flat file have duplicate entries ?
Narisimha, please check that you dont have duplicate entries in the proposed primary key in the flat file.
Generally out-of-seq arises due to
(1) file not sorted on key field
(2) duplicate entries in key field
Regds
Punith |
|
Back to top |
|
|
Narismha
New User
Joined: 22 Nov 2006 Posts: 23 Location: Mumbai
|
|
|
|
Thanks for all your efforts.
Sorry for the mistake. it have duplicate entries. I have given "SUM fields = none" and its working fine.
Thanks and Regards
-Narisimha |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome.
Thank you for posting the resolution |
|
Back to top |
|
|
|