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 Initialization

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
smita V

New User


Joined: 05 Nov 2007
Posts: 11
Location: hyderabad

PostPosted: Thu May 28, 2009 1:57 pm    Post subject: Vsam Initialization
Reply with quote

Hi,

I have a VSAM file which I am first deleting and defining, down the line will process a program which may insert few records to it.
In another jOb I am Reproing this VSAM file to a Flat file. If no records were inserted to the VSAM file it is giving me an error saying :
ERROR OPENING WE8D.T546D.CLPREREN
** VSAM OPEN RETURN CODE IS 160

I tried to initialize the File through JCl by including a step before repro to copy a dummy record to it. But still it is giving me the same error.

//WESW020 EXEC PGM=IDCAMS ==> INITIALIZE CLPREREN
//DUMMYIN DD DUMMY,DISP=SHR,
// DCB=(SYS.MODEL,LRECL=01200,RECFM=FB)
//SYSIN DD DSN=TSZV055.COB.COB(REPRO),
// DISP=SHR
----+----1----+----2----+----3----+----4----+----5--
REPRO INFILE(DUMMYIN) -
OUTFILE(OUTFIL1)
//OUTFIL1 DD DSN=WEST.WSZVD.TO16D.CLPREREN,
// DISP=SHR
//SYSPRINT DD SYSOUT=(*)
//SYSUDUMP DD SYSOUT=(D),
// HOLD=YES

Please let me know if there is any other way to Initialize the VSAM file through JCL.
I can't use VSAMINIT.

Thanks,
Smita
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 28, 2009 2:09 pm    Post subject:
Reply with quote

But you do not actually write a record to the file do you. The input is dummied out.
Back to top
View user's profile Send private message
smita V

New User


Joined: 05 Nov 2007
Posts: 11
Location: hyderabad

PostPosted: Thu May 28, 2009 2:14 pm    Post subject:
Reply with quote

I was trying out a way to initialize the VSAM dataset, as I have read it in other posts. If it had worked, I could have used it after confirming that the VSAM file is empty.
But if there is any other better way, please let me know.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu May 28, 2009 5:02 pm    Post subject:
Reply with quote

Quote:
I was trying out a way to initialize the VSAM dataset, as I have read it in other posts. If it had worked, I could have used it after confirming that the VSAM file is empty.
Your statements here are in conflict. To initialize the VSAM file, you must write a record into it. An initialized VSAM file therefore cannot be empty. You can then delete that record so the file has no records in it.

"Empty" as used in the VSAM Demystified IBM Redbook, and in this post, means something entirely different from the file not having any records in it. The Redbook states
Quote:
You need to load a data set first, because in VSAM non-RLS mode, your application program cannot open for input to an empty data set.


And, unlike flat files, VSAM files must actually have something written to them -- using a REPRO from a DUMMY input file does not do anything to the VSAM file, so it remains empty.
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 VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
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

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