View previous topic :: View next topic
|
Author |
Message |
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Ok. Thanks a lot expat. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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
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 |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
GaganGarg,
Use IEBGENER to create the tape as SYSUT2 and with a SYSUT1 as DUMMY, instead of program IEFBR14. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|