when I am executing this JCl , its giving me JCL error
"SORTIN - DISP FIELD INCOMPATIBLE WITH DSNAME "
I have tried with differnet combination of disp parameter, still getting the same eroor.
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
Posted: Fri Sep 28, 2007 11:21 am Post subject:
The syntax is fine. Have you verified that STEP02A executed? If it did execute, were there any records written to that file? It's been a while since I worked with TAPE, but I'm wondering if you actually catalog the dataset when you code DEFER and don't open the file. Found these notes in the JCL Reference:
Code:
DEFER when Data Set is Never Opened: If you request deferred mounting of a volume and the data set on that volume is never opened by the processing program, the volume is never mounted during the job step.
Code:
An unopened tape data set is cataloged, unless the volume request is nonspecific or unless the data set is allocated to a dual-density tape drive but no density is specified. A nonspecific volume request is a DD statement for a new data set that can be assigned to any volume or volumes.
the file in the previous step is not created.what should I use in UNIT parameter instead of UNIT=TAP5,,DEFER)? so that i will not get the error for disp parameter mismatch
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
Posted: Mon Oct 01, 2007 1:42 pm Post subject:
I guess you have a few options here.
1) Modify the M2806LTX program to set the return code to a non-zero value when the output file is not opened, and then bypass step SORT2A when step STEP02A issues that return code.
2) Modify M2806LTX to always open the file even if no records are written.
3) Pre-allocate the tape dataset with an IEBGENER step prior to STEP02A and change the DISP of the FILEOUT DD to OLD.
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
Posted: Mon Oct 01, 2007 1:49 pm Post subject:
You can code UNIT=TAP5 without DEFER but you may still have problems if the file is not OPENED/CLOSED by the program.
Another option is to create an empty dataset(+1),DISP=(,PASS) on tape in a prior step (maybe a SORT with SORTIN DD DUMMY) Then use it as dataset(+1),DISP=(OLD,CATLG) in STEP02A. You'll be assured of a file for step SORT2A. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum