Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
VSAm KSDS file open problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: VSAm KSDS file open problem
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: 190
Location: hyderabad

PostPosted: Tue Apr 19, 2005 12:52 pm    Post subject: Re: VSAm KSDS file open problem
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    Post subject:
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: 190
Location: hyderabad

PostPosted: Tue Apr 19, 2005 2:58 pm    Post subject: Re: VSAm KSDS file open problem
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    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Apr 19, 2005 3:25 pm    Post subject: Re: VSAm KSDS file open problem
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 7 Fri Sep 22, 2017 11:35 pm
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 5 Thu Sep 07, 2017 6:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us