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

Job should not abend for Migrated/Unavailable datasets.


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

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Wed Mar 24, 2010 8:21 pm
Reply with quote

Hi,

For example, if a JCL Step is trying to delete 10 DD's out of which 5 are not present, it should delete 5 available DD's and should not abend for other 5 migrated or unavailable datasets.

Thanks,
Kapil.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 24, 2010 8:28 pm
Reply with quote

if the system has been properly setup ... the job will not abend

it will produce a JCL error if some datasets are not found

it will delete the not migrated ones,
depending on the zOS level it will recall and delete or simply delete the migrated ones
thats all that will happen for a properly setup system

anyway I never had an abend because of recalling migrated datasets

for dataset delete anyhow the best approach is an IDCAMS DELETE it will...

DELETE the dataset on primary volumes
HDELETE the migrated ones
Back to top
View user's profile Send private message
kapil dev arora

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Wed Mar 24, 2010 8:40 pm
Reply with quote

Can we execute the job without JCLERROR for available datasets even if half of the datasets in the JCL step are not available?

In the below step GDG1 and GDG2 are available and GDG11 and GDG22 are not available(They don't have any versions, just base).


Code:
//CSADEL11 EXEC PGM=IEFBR14,REGION=&RGN             
//*                                                 
//DD1      DD  DSN=ABC.TESTING.GDG1,       
//             DISP=&DISP,                         
//             UNIT=&UNIT,SPACE=&SPACE             
//*                                                 
//DD2      DD  DSN=ABC.TESTING.GDG11,     
//             DISP=&DISP,                         
//             UNIT=&UNIT,SPACE=&SPACE             
//*                                                 
//DD3      DD  DSN=ABC.TESTING.GDG2,       
//             DISP=&DISP,                         
//             UNIT=&UNIT,SPACE=&SPACE             
//*                                                 
//DD4      DD  DSN=ABC.TESTING.GDG22,     
//             DISP=&DISP,                         
//             UNIT=&UNIT,SPACE=&SPACE
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 24, 2010 8:43 pm
Reply with quote

Quote:
Can we execute the job without JCLERROR for available datasets even if half of the datasets in the JCL step are not available?


what happened when You tried ?
Back to top
View user's profile Send private message
kapil dev arora

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Wed Mar 24, 2010 8:45 pm
Reply with quote

DD2 - DATA SET NOT FOUND
- STEP WAS NOT EXECUTED.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Mar 24, 2010 8:46 pm
Reply with quote

Use IDCAMS instead of IEFBR14 and JES.
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 Mar 24, 2010 9:01 pm
Reply with quote

In "DISP=&DISP"..."&DISP" changes to what? Telling us that can be of help.
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 Mar 24, 2010 9:04 pm
Reply with quote

Quote:
GDG11 and GDG22 are not available(They don't have any versions, just base).

Akatsukami wrote:
Use IDCAMS ...
Not very sure if OP is creating some empty generation(s) already...I forsee some problem(s) using IDCAMS then...
Back to top
View user's profile Send private message
kapil dev arora

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Wed Mar 24, 2010 9:19 pm
Reply with quote

Quote:
In "DISP=&DISP"..."&DISP" changes to what? Telling us that can be of help.


DISP='(MOD,DELETE,DELETE)',

-----------
There are no versions for the 11 and 22 and are not getting recreated too.
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 Mar 24, 2010 9:36 pm
Reply with quote

Code:
//STEP0010 EXEC PGM=IEFBR14                         
//DD1     DD  DSN=HLQ.some.GDG(+1),             
//            DISP=(MOD,DELETE,DELETE),             
//            UNIT=SYSDA,SPACE=(CYL,(1,2),RLSE),     
//            DCB=(LRECL=??,RECFM=FB)               
//*                                                 
works for me, what are you using?
Back to top
View user's profile Send private message
kapil dev arora

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Wed Mar 24, 2010 9:42 pm
Reply with quote

Code:
//CSADEL11 EXEC PGM=IEFBR14,REGION=&RGN
//*
//DD1 DD DSN=ABC.TESTING.GDG1,
// DISP=&DISP,
// UNIT=&UNIT,SPACE=&SPACE
//*
//DD2 DD DSN=ABC.TESTING.GDG11,
// DISP=&DISP,
// UNIT=&UNIT,SPACE=&SPACE
//*
//DD3 DD DSN=ABC.TESTING.GDG2,
// DISP=&DISP,
// UNIT=&UNIT,SPACE=&SPACE
//*
//DD4 DD DSN=ABC.TESTING.GDG22,
// DISP=&DISP,
// UNIT=&UNIT,SPACE=&SPACE



Here each DD is a base name for which all its version to be deleted( and base should not be deleted). Job needs to run successfully under the condition that even if DD2 and DD4 are not having any versions for its base it shoul run fine and delete all the versions for DD1 and DD3.

I am not sure but the code you pasted is doing it only for one gdg version.

Thanks,
Kapil.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Mar 24, 2010 10:12 pm
Reply with quote

Anuj Dhawan wrote:
Akatsukami wrote:
Use IDCAMS ...
Not very sure if OP is creating some empty generation(s) already...I forsee some problem(s) using IDCAMS then...

Why? Unless the TS is giving us incorrect or incomplete requirements (which, I grant, happens often enough on these fora that the possibility must be considered), the task is to delete all generations, empty or otherwise, of the specified GDGs, and to not abend if a GDG base with no associated data sets is specified. Will not IDCAMS do just that?
Back to top
View user's profile Send private message
lokesh vasanthi

New User


Joined: 19 Aug 2005
Posts: 17
Location: Chennai, India

PostPosted: Thu Mar 25, 2010 1:34 am
Reply with quote

Hi Kapil,

In your case before delete step add one more IEFBR14 step which will create the one empty relative generation files for all the GDG bases which needs to be deleted.

So next step you wouldn't get the JCL error for Dataset not found.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Mar 25, 2010 2:26 am
Reply with quote

Here is some tested JCL:
Code:

//STEP1    EXEC PGM=IDCAMS                                         
//SYSPRINT DD   SYSOUT=*                                           
//SYSIN    DD   *                                                   
 DEFINE GDG (NAME(DIV.TESTING.GDG1) LIMIT(10) NOSCRATCH)           
 DEFINE GDG (NAME(DIV.TESTING.GDG2) LIMIT(10) NOSCRATCH)           
 DEFINE GDG (NAME(DIV.TESTING.GDG3) LIMIT(10) NOSCRATCH)           
 DEFINE GDG (NAME(DIV.TESTING.GDG4) LIMIT(10) NOSCRATCH)           
/*                                                                 
//STEP2    EXEC PGM=IEBDG                                           
//SYSPRINT DD   SYSOUT=*                                           
//FOO      DD   DSN=DIV.TESTING.GDG1(+1),DISP=(,CATLG,DELETE),     
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),SPACE=(TRK,(1,1),RLSE),
//         UNIT=DISK                                               
//SYSIN    DD   *                                                   
  DSD    OUTPUT=(FOO)                                               
  FD     NAME=FIELD1,LENGTH=36,STARTLOC=1,FORMAT=AN,ACTION=RP       
  CREATE QUANTITY=100,NAME=FIELD1,FILL=X'40'                       
/*                                                                 
//STEP3    EXEC PGM=IEFBR14                                         
//BAR      DD   DSN=DIV.TESTING.GDG3(+1),DISP=(,CATLG,DELETE),     
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),SPACE=(TRK,(1,1),RLSE),
//         UNIT=DISK                                               
//STEP4    EXEC PGM=IDCAMS                                         
//SYSPRINT DD   SYSOUT=*                                           
//SYSIN    DD   *                                                   
 DELETE DIV.TESTING.GDG1 GDG PURGE FORCE                           
 DELETE DIV.TESTING.GDG2 GDG PURGE FORCE                           
 DELETE DIV.TESTING.GDG3 GDG PURGE FORCE                           
 DELETE DIV.TESTING.GDG4 GDG PURGE FORCE                           
/*                                                                 

  • STEP1 creates the GDG bases.
  • STEP2 creates a generation of DIV.TESTING.GDG1 with 100 records in it.
  • STEP3 creates a generation of DIV.TESTING.GDG3 with zero records in it (indeed, it is not even opened).
  • STEP4 deletes the GDG bases and zero or more generations of each data set, as may exist.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Mar 25, 2010 12:19 pm
Reply with quote

kapil dev arora wrote:
There are no versions for the 11 and 22 and are not getting recreated too.
/RANT ON

When talking about GDS it is important to use the correct terminology, as both version and generation are both valid in terms of a GDS.

It is a well known fact that only one version of a GDS may exist at any one time, however, multiple generations may exist together.

Please learn and use the correct terminology when posting, as using the wrong term can cause confusion and possibly delay a resolution to your problem

/RANT OFF
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 ISAM and abend S03B JCL & VSAM 10
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts How Can I Recall a Migrated Data Set ... PL/I & Assembler 3
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
Search our Forums:

Back to Top