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

Facing Problem while trying to read Empty VSAM


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

New User


Joined: 28 Dec 2005
Posts: 24

PostPosted: Wed Jan 25, 2006 1:48 am
Reply with quote

I have a VSAM file, which i'm deleting at the starting of the job and defining in again.

Then I'm trying to write records into from a Flat file. But I'm getting a VSAM error code of 35. I don't think there is any problem with the declaration of VSAM file or with the DD name.

I'm opening the file in Output mode and given organisation as indexed with access as random ( also tried with sequential )

Can anyone please tell me what am i supposed to do ?

Thanks in advance

Rahul
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Jan 25, 2006 2:29 am
Reply with quote

Can you please supply us with the JCL? And if you?re writing from a COBOL program the FDs.

The file status of 35 says that you are trying to open a DD tat isn't there and not declared as optional. Usually this if a mismatch in spelling.

Code:

   |      |             |   5  | An OPEN statement with the INPUT, I-O, or  |
   |      |             |      | EXTEND phrase was attempted on a           |
   |      |             |      | non-optional file that was not present.    |
   |      |             |______|____________________________________________|
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Wed Jan 25, 2006 10:00 am
Reply with quote

Hi catchyblues,

I also faced same problem,To solve this

Move dummy records after Definning the VSAM file. and after that try to write the records from Flat file.

Hope this helps

Regards
Rupesh
Back to top
View user's profile Send private message
sbalajibe

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Wed Jan 25, 2006 10:51 am
Reply with quote

Hi catchyblues,

Rupesh is correct. u cannot open a empty VSAM File . first u have to load some dummy record .



thanks
Balaji
Back to top
View user's profile Send private message
catchyblues

New User


Joined: 28 Dec 2005
Posts: 24

PostPosted: Wed Jan 25, 2006 10:55 am
Reply with quote

hi

now i'm gettin error code 37 on empty vsam while trying to open it...

i'm pasting the file declration and the job steps...

SELECT GPRT ASSIGN TO GPRT
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS GPRT-POLICY
FILE STATUS IS W01-GPRT-STATUS.

using idcams to delete and create the file at the beginning of the job
Code:

DELETE COMFAM.SYST.GPRT.KSDS
  IF MAXCC < 9 THEN SET MAXCC = 0
  DEFINE CLUSTER(                   -
            NAME(COMFAM.SYST.GPRT.KSDS) -
            INDEXED                 -
            FSPC(5 5)               -
            KEYS(12 0)              -
            RECSZ(330 330)          -
            RECORDS(100 10)         -
            SHR(1 3)                -
            )                       -
          DATA (                    -
            NAME(COMFAM.SYST.GPRT.KSDS.DATA) -
            CISZ(512)               -
            )                       -
          INDEX (                   -
            NAME(COMFAM.SYST.GPRT.KSDS.INDEX) -
            )


the jcl is
Code:

/*S0020   EXEC PGM=DFSRRC00,PARM='DBB,GQ500,GQ500PSS',COND=(0,NE)
//S0020   EXEC PGM=DFSRRC00,PARM='DBB,GQ500,GQ500PSS'
//*
//*\       *** STEP 3 - GQ500 -  INTERFACE**
//*
//SYSOUT   DD  SYSOUT=(,),OUTPUT=*.JCLASS
//SYSPRINT DD  SYSOUT=(,),OUTPUT=*.JCLASS
//SYSUDUMP DD  SYSOUT=(,),OUTPUT=*.ZCLASS
//IMSUDUMP DD  SYSOUT=(,),OUTPUT=*.ZCLASS
//DFSRESLB DD  DISP=SHR,
//             DSN=SYS1.IMSD.RES.LOAD
//IEFRDER  DD  DSN=COMFAM.DEVL.IMSLOG.&SYSUID..GQ500PS.DATA,
//             DISP=(NEW,DELETE,CATLG),
//             UNIT=(SYSDA,4),
//             SPACE=(CYL,(10,20),RLSE),
//             BLKSIZE=22528,LRECL=22524,BUFNO=4
//IMSACB   DD  DISP=SHR,
//             DSN=CSDDBA.DEVL.IMS.ACB.LOAD
//DFSVSAMP DD  DISP=SHR,
//             DSN=COMFAM.SYST.FAME.PARM(DFSVSAML)
//GQN      DD  DISP=SHR,
//             DSN=COMFAM.SYST.FAME.GQNO.DATA
//GPRT     DD  DISP=OLD,
//             DSN=COMFAM.SYST.GPRT.KSDS



I'm reading GQN file and trying to write it in GPRT..... but getting the error code 37 while opening GPRT itself...
Back to top
View user's profile Send private message
sbalajibe

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Wed Jan 25, 2006 11:38 am
Reply with quote

hi,

Try this
SELECT GPRT ASSIGN TO DA-GPRT
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS GPRT-POLICY
FILE STATUS IS W01-GPRT-STATUS.

thanks
balaji
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 Error to read log with rexx CLIST & REXX 11
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
Search our Forums:

Back to Top