Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Facing Problem while trying to read Empty VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Facing Problem while trying to read Empty VSAM
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    Post subject: Re: Facing Problem while trying to read Empty VSAM
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: 464

PostPosted: Wed Jan 25, 2006 10:00 am    Post subject: Re: Facing Problem while trying to read Empty VSAM
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    Post subject:
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    Post subject: Now getting error code 37 on empty VSAM
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us