IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VSAm KSDS file open problem


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
itsram

New User


Joined: 08 Apr 2005
Posts: 5
Location: Delhi

PostPosted: Tue Apr 19, 2005 12:24 pm
Reply with quote

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

Active User


Joined: 17 Oct 2004
Posts: 191
Location: hyderabad

PostPosted: Tue Apr 19, 2005 12:52 pm
Reply with quote

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

New User


Joined: 08 Apr 2005
Posts: 5
Location: Delhi

PostPosted: Tue Apr 19, 2005 1:38 pm
Reply with quote

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

Active User


Joined: 17 Oct 2004
Posts: 191
Location: hyderabad

PostPosted: Tue Apr 19, 2005 2:58 pm
Reply with quote

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

New User


Joined: 08 Apr 2005
Posts: 5
Location: Delhi

PostPosted: Tue Apr 19, 2005 3:23 pm
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Apr 19, 2005 3:25 pm
Reply with quote

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

New User


Joined: 08 Apr 2005
Posts: 5
Location: Delhi

PostPosted: Tue Apr 19, 2005 4:08 pm
Reply with quote

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

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Wed Apr 27, 2005 9:55 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top