View previous topic :: View next topic
|
Author |
Message |
itsram
New User
Joined: 08 Apr 2005 Posts: 5 Location: Delhi
|
|
|
|
Hi,
I am facing a problem while doing simple KSDS file sequential reading and writng it in a sequential file. Getting file status 35 while opening input file IN-FILE.
KSDS file is filled with data from a sequential file usinig REPRO.
I am pasting the COBOL file-control as below.
FILE-CONTROL.
SELECT IN-FILE ASSIGN TO DD1
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS SORT-KEY-IN
ALTERNATE RECORD KEY IS OTHER-INFO WITH DUPLICATES
FILE STATUS IS FILE-STATI.
The File section is like below:
FILE SECTION.
FD IN-FILE
DATA RECORD IS IN-REC.
01 IN-REC.
02 SORT-KEY-IN PIC X(6).
02 OTHER-INFO PIC X(41).
02 FILLER PIC X(33).
My KSDS file declaration is like below:
//STEP1 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE E08919.SURAJIT.KSDSF
DEFINE CLUSTER (NAME(E08919.RAM.KSDSF) -
CYLINDER(3 1) -
RECORDSIZE(80 80) -
FREESPACE(20 20) -
SHAREOPTIONS(2 3) -
KEYS(5 0) -
INDEXED) -
DATA -
(NAME(E08919.RAM.KSDSF.DATA) -
CISZ (4096) -
FSPC (10 20)) -
INDEX -
(NAME (E08919.RAM.KSDSF.INDX))
/*
//
My COBOL run JCL DD statments is like below:
//DD1 DD DSN=E08919.RAM.KSDSF,DISP=SHR
//OUTFILE DD DSN=E08919.RAM.INFILE,DISP=MOD
Please advise how to solve this error. If you need some more info then please do let me know.
Thanks in advance,
Ram.. |
|
Back to top |
|
|
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
Hi ram
the error may be due to
ATEEMPTING TO OPEN AN EMPTY FILE IN INPUT OR I/O MODE. DD NAME IS MISSING OR WRONGLY GIVEN.
An OPEN statement with the INPUT, I-O, or EXTEND phrase was attempted on a non-optional file that was not present.
Check that the file is not empty while reading.
regards
siva |
|
Back to top |
|
|
itsram
New User
Joined: 08 Apr 2005 Posts: 5 Location: Delhi
|
|
|
|
Hi Siva,
Thanks for your input. I know the reason of error as file status 35.
1. The file is not empty( I have copyed the same KSDS file to a SEQ file using REPRO then it is performing OK. as I don't have FileAid).
2. The DD name is same in the COBOL Assign clause and in Run JCL.
That is the reason why I am confused.
what could be the other cause apart from this mentioned above.
Please do let me know.
Regards,
Ram.. |
|
Back to top |
|
|
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
hi ram
i am not aware of other senerios where we get this error
why are you deleting E08919.SURAJIT.KSDSF
delete ur cluster ,define it & do a new repro
also check ur code related to files,the file attricutes etc
regards
siva |
|
Back to top |
|
|
itsram
New User
Joined: 08 Apr 2005 Posts: 5 Location: Delhi
|
|
|
|
Hi Siva,
That was a mistake that I wrote, besically I am deleting my KSDS only E08919.RAM.KSDSF. That is not the issue I think.
any ways thanks for your time.
Regards,
Ram.. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm not a COBOL programmer, but I noticed that your program specifies the key as "02 SORT-KEY-IN PIC X(6)", yet in your file definition you have your key defined as "KEYS(5 0)". Seems to me that these two should match. |
|
Back to top |
|
|
itsram
New User
Joined: 08 Apr 2005 Posts: 5 Location: Delhi
|
|
|
|
Hi Superk,
Thanks for your input. You have noticed one correct error but I think that is not the issue here as the problem is due to opening of file.
Regards,
Ram.. |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
|
|
Ram
Just a thought.
You had defined an alternate key in your file-control as
Code: |
ALTERNATE RECORD KEY IS OTHER-INFO WITH DUPLICATES
|
Are you building an AIX ? Because your IDCAMS step is not showing it.
Regds
-Som |
|
Back to top |
|
|
|