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

Problem with creation of tape dataset


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

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed May 05, 2010 4:25 pm
Reply with quote

Hi,

I am facing a problem with the tape file. I am creating a tape dataset that i want to retain for 3 years and i am using the below set of statements in the JCL:
//*
//IEFBR02 EXEC PGM=IEFBR14,COND=(4,LT)
//SYSUDUMP DD SYSOUT=Z
//DD01 DD DSN=ITMA.ITMB471.ITEMDEL.QSAM,
// DISP=(NEW,CATLG,DELETE),UNIT=ETAPE,
// LABEL=(1,SL,RETPD=1095),
// DCB=(RECFM=FB,LRECL=138,BLKSIZE=27600)
//*

When i am submitting the Job, Maxcc is zero but when i am accesing the above file in a cobol program by subitting another job, it is showing JCL ERROR and message is SPACE is not specified for the file 'ITMA.ITMB471.ITEMDEL.QSAM'. (although I think there is no need to specify SPACE for tape datasets, yet I also tried to create the file by giving SPACE parameter but that also doesn't work). Please let me know if I am making any mistake while creating the dataset.
Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 4:31 pm
Reply with quote

1) Is the tape cataloged by the creation job.
2) Why not just create the tape in the COBOL program.
3) How are you addressing the tape in the job with the COBOL program.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 4:37 pm
Reply with quote

Come to think of it, as IEFBR14 does not open any datasets, by the time that a tape mount is requested the job should have finished.

A quick test confirms that, so points 1 & 2 above are pretty valid.
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed May 05, 2010 4:37 pm
Reply with quote

I can't create the file in COBOL program, I have to open the Tape file in EXTEND mode in program so that i can append the data in the file every time when I run the program. I have given DISP=MOD for this tape dataset in the job executing the COBOL program.

Quote:
Is the tape cataloged by the creation job



When i have submitted the JCL Which creates the Tape file, I checked file name was not in catalog although maxcc is equal to zero.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 4:43 pm
Reply with quote

Well, if the file name is NOT in the catalog then it has not been cataloged, so you can not access it via the catalog, In fact, from my test the tape mount was requested but the job had finished before any tape was mounted.

e.g. //DDNAME DD DSN=Data set name,DISP=MOD

So maybe it is the site ACS routines that are stepping in and saying that this dataset does not exist therefor I will create it, and the default is DASD. But as ACS routines are site specific .........

Anyway, you have not answered point 3 above.

Why can you not create the tape in the COBOL program, if you write to the tape witha a DISP=MOD it will MOD the data. Have you tried this. What happened.

If you really do insist on going about thistask in the way that you want to, then use a proper program like IEBGENER to create the tape file, but also be aware of any site specific TMS restrictions for using pre existing tapes.
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed May 05, 2010 4:53 pm
Reply with quote

I am using the file in the Job executing the COBOL program as given below:


//ITMB471 EXEC PGM=ITMB471
//SYSIN DD DSN=OPERA12.XXXX.JCLLIB(ITML471),DISP=SHR
//FKLTFILE DD DSN=ITMA.FKLT.FILE.VSAM,DISP=SHR
//XXXXDEL DD DSN=ITMA.ITMB471.ITEMDEL.QSAM,DISP=MOD
//EXCPFILE DD DSN=ITMA.FKLT.FILE.EXCEP,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
Quote:
Why can you not create the tape in the COBOL program, if you write to the tape witha a DISP=MOD it will MOD the data. Have you tried this. What happened.


I could not get this point. Suppose i have successfully run the job to execute the cobol program and tape file is cataloged. Next time when i will run the job again executing the cobol program, will it not be an error if we will try to create tape file again? Actually "create the tape in the COBOL program" is confusing for me. please clarify.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed May 05, 2010 5:00 pm
Reply with quote

GaganGarg, there is a link to the manuals at the top of the page. Click on it, find the JCL Language Reference manual, and read it. If you do so, you will find that DISP=MOD will create a data set if it does not already exist, and append data to the end of an existing data set.

Have you verified your site policies? Some sites will not allow the expiration data of a tape to be changed by an applications programmer -- the site support group must do so.

Finally, even if your site allows you to change an expiration date with JCL, using IEFBR14 will not do it. The tape data set must be opened, generally, for the expiration date change to be effective and IEFBR14 will not open the data set.
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed May 05, 2010 5:09 pm
Reply with quote

Ok. Thanks a lot expat. icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed May 05, 2010 5:09 pm
Reply with quote

Quote:
When i am submitting the Job, Maxcc is zero
IEFBR14 jobs will always give you a RC (MAXCC?) of 0 irrespective of what you tell it do. If you mention Retention-period for tape, it's in DCB information, IEFBR14 does not care about it and that won't change the RC of IEFBR14.

GaganGarg wrote:
but when i am accesing the above file in a cobol program by subitting another job, it is showing JCL ERROR and message is SPACE is not specified for the file
If it's a JCL error, it should have been known at the time of sytax-check of JCL executing the COBOL program, is not it?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 5:19 pm
Reply with quote

Anuj Dhawan wrote:
IEFBR14 jobs will always give you a RC (MAXCC?) of 0 irrespective of what you tell it do.

Sir, I beg to differ on this frivolous statement icon_lol.gif

Please consider the two scenarios below where RC 0 will not occur.

What happens if the JCL references a non existant dataset with disp of old or shr.

Also, it is possible for IEFBR14 to abend.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed May 05, 2010 8:18 pm
Reply with quote

GaganGarg,

Use IEBGENER to create the tape as SYSUT2 and with a SYSUT1 as DUMMY, instead of program IEFBR14.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed May 05, 2010 8:34 pm
Reply with quote

correct me if I am wrong:

IEFBR14 will only allocate, but not OPEN or CLOSE the file

IEBGENER will allocate, OPEN, write if any requests exist, and CLOSE.
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: Wed May 05, 2010 9:39 pm
Reply with quote

Hi Dick,

A bit of clarification. Neither IEFBR14 nor IEBGENER allocate the file. This is done before the program begins execution.

The other is as you say. . .


@GaganGarg,

Suggest you make sure the volume being MODed onto is not the only copy of the data. If you are part way thru an update to the tape and the job abends, you have a mess. . .
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Deleting a Tape file JCL & VSAM 14
Search our Forums:

Back to Top