Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Job should not abend for Migrated/Unavailable datasets.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Job should not abend for Migrated/Unavailable datasets.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Mar 24, 2010 8:28 pm    Post subject: Reply to: Job should not abend for Migrated/Unavailable data
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    Post subject: So is it possible to execute it without JCLerrors
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Mar 24, 2010 8:43 pm    Post subject: Reply to: Job should not abend for Migrated/Unavailable data
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    Post subject: I got JCLERROR ..
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: 1738
Location: Bloomington, IL

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

Use IDCAMS instead of IEFBR14 and JES.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Wed Mar 24, 2010 9:01 pm    Post subject:
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

Senior Member


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

PostPosted: Wed Mar 24, 2010 9:04 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Wed Mar 24, 2010 9:36 pm    Post subject: Reply to: Job should not abend for Migrated/Unavailable data
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    Post subject: Here is my code ..
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: 1738
Location: Bloomington, IL

PostPosted: Wed Mar 24, 2010 10:12 pm    Post subject:
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    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Thu Mar 25, 2010 2:26 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 25, 2010 12:19 pm    Post subject:
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    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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us