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

File status of 35 when opening Alternate index


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Fri Nov 24, 2006 12:42 pm
Reply with quote

I have created AIX for my KSDS. Now I want to access this AIX using COBOL. But as I open the the file I get a File status of 35. I dont know whats wrong. Is there any one who can proveide me a code for accessing alternate index in vsam using COBOL.

Thanks and regards
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Nov 24, 2006 1:28 pm
Reply with quote

Quote:
But as I open the the file I get a File status of 35. I dont know whats wrong

VSAM file code 35 denotes a non existence file is been tried to open. Check reference of the file in your program.
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Fri Nov 24, 2006 1:46 pm
Reply with quote

but file is there and I am able to access it normally.

I want use AIX in dynamic mode what will be th code for that
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Nov 24, 2006 1:54 pm
Reply with quote

Quote:
but file is there and I am able to access it normally.

How is it referred in the program... is the question.

Why not to paste your COBOL & JCL reference for that file.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Nov 24, 2006 2:03 pm
Reply with quote

Hi

Check with your COBOL SELECT statement if the ALTERNATE KEY phrase is properly coded or not.
It will be helpful if you provide us with your COBOL and JCL code.

Thanks
Arun
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Fri Nov 24, 2006 2:35 pm
Reply with quote

here is my prg

ID DIVISION.
PROGRAM-ID. 'HEMANT'.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INFILE ASSIGN TO 'MASTERA'
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS RLNO
ALTERNATE RECORD KEY IS ALKY WITH DUPLICATES
FILE STATUS IS FS.
DATA DIVISION.
FILE SECTION.
FD INFILE.
01 IN-REC.
02 RLNO PIC X(3).
02 ALKY PIC X(3).
02 NAME PIC X(10).
02 FILLER PIC X(63).
WORKING-STORAGE SECTION.
01 FS PIC X(2).
01 J PIC X(2).
PROCEDURE DIVISION.
OPEN INPUT INFILE.
MOVE 111 TO ALKY.
READ INFILE KEY IS ALKY.
DISPLAY FS. =====> here i get 23.
DISPLAY RLNO , ALKY , NAME.
CLOSE INFILE.
STOP RUN.

and here is run JCL

//MTPLD06R JOB ,,
// CLASS=E,MSGCLASS=H,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID,LINES=(1,CANCEL)
//RUN EXEC PGM=MYPRG
//SYSPRINT DD SYSOUT=*
//STEPLIB DD DSN=MTPLD06.HEMANT.LOADLIB,DISP=SHR ==>LOADLIB NAME
//MASTERA DD DSN=MTPLD06.HEMANT.KSDS,DISP=SHR
//MASTERA1 DD DSN=MTPLD06.HEMANT.KSDS.AIX.PATH,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Fri Nov 24, 2006 2:57 pm
Reply with quote

and when I use file in dynamic mode then


start infile key is alky.
read infile next record.
display fs ==========> here I get fs as 35.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Nov 24, 2006 3:10 pm
Reply with quote

hi

Please confirm the error code. R U getting Error Code As 23 or 35. If 23 then from UR code its quite evident that value "111" is not present in the
ALTX, in case 35 then chances are that probably DD name must have been commented & in the Pgm. U tryng to open the file in Input Mode.
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Fri Nov 24, 2006 3:17 pm
Reply with quote

well fs is 23 when i m using random access and for ur information '111' is in there and fs is 35 when using dynamic mode and ddnames are not commented since i have already given my run jcl as well.
Back to top
View user's profile Send private message
nikhil aphale

New User


Joined: 04 Apr 2007
Posts: 1
Location: UK

PostPosted: Tue Apr 24, 2007 10:54 pm
Reply with quote

Hi..

Are you able to find a solution for the above problem? I am getting error status of 35 when trying to open a vsam file. I have checked the contents of the file through file-aid. Data is present in the file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Apr 24, 2007 11:00 pm
Reply with quote

Hello star_dhruv2000,

What happens if you issue a DISPLAY FS immediately after the open?
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
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