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
 

 

Searching and deleting a dataset created in the JCL.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vickey_tcs

New User


Joined: 14 Mar 2009
Posts: 5
Location: At Desk

PostPosted: Mon Mar 16, 2009 9:32 pm    Post subject: Searching and deleting a dataset created in the JCL.
Reply with quote

Hi,

For testing purposes i uses many test files.My query is that while testing a JCL for more than 1 time, i first delete the file created in previous test JCL and then run ..this consumes lot of time..Could any one help me the following..

I want to create a tool in REXX/CLIST.eg: when i give tso search..automatically the search tool should find the dataset created in the JCL and delete it..

Please help me on this...
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 16, 2009 9:38 pm    Post subject:
Reply with quote

Hello,

Suggest you include one single step at the beginning of each test job to "clean house" before running.

This step could be an IEFBR14 that specifies disp=(mod,delete) for each file that may be created by the job so they will not already exist when the attempt is made to create them.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Tue Mar 17, 2009 10:19 am    Post subject:
Reply with quote

I use this step before a step which creates the data set(s).
Code:
//DELST1   EXEC PGM=IDCAMS                                       
//SYSPRINT DD  SYSOUT=*                                           
//SYSIN    DD  *                                                 
     DELETE  data-set-name1 PURGE             
     DELETE  data-set-name2 PURGE           
     IF MAXCC LT 9 THEN SET MAXCC EQ 0                           
                   ELSE SET MAXCC EQ 16                           
/*
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Mar 17, 2009 1:43 pm    Post subject:
Reply with quote

Hi,

By any chance do you have CA-Jobtrac (Scheduler) available to you?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Mar 17, 2009 1:52 pm    Post subject:
Reply with quote

Hi again,

I'm not sure how good to ask this - what if one is supposed to run multiple JCLs for some testing and end-up with lots of "new-files"? Are we supposed code IEFBR14 or IDCAMS for each DSN . . .mmmm..this thought itself is kinda scary - what's the benefit of taking birth in SMS world then?

I never used such methods instead I use UCC11RMS with TYPRUM=F (PARM=F) as first step in each JCL I submit . . . this takes care of what is being asked in this thread.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Tue Mar 17, 2009 2:04 pm    Post subject:
Reply with quote

Quote:
... I use UCC11RMS with TYPRUM=F (PARM=F) ...

I don't have this in developement as well as in testing...

Even I see IDCAMS DELETE for new datasets in production JCLs.

Guess I'm missing something here? icon_sad.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 17, 2009 8:48 pm    Post subject:
Reply with quote

Hello,

Quote:
Guess I'm missing something here?
Me too . . . icon_confused.gif

I believe that using br14 or idcams is a very simple, completely workable method can be implemented.

Well written jobstreams will delete any unneeded files before ending and this "first" step is merely insurance.
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 18, 2009 2:44 pm    Post subject:
Reply with quote

dick scherrer wrote:
Well written jobstreams will delete any unneeded files before ending . . .
Yes if they are "unneeded" they should be deleted. But OP talks about
Quote:
For testing purposes i uses many test files
which I assume are the "natural" & "needed" outcome from the JCL. I believe - in his test runs there are some files, which should be created because they are the expected output files. But as he is testing so in a re-test, when JCL is checked for syntax erros, for such file there is a sytax error that "file is already cataloged" . . .

Does other shop don't have any in-house utilites or some sheduler to deal with these things. On a daily basis, sometimes, I run many many test with many JCLs . . . what if my first run does not yield the expected result, how many files should I delete via BR14 or IDCAMS? Even if I use them, how practical solution is that . . . icon_confused.gif
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed Mar 18, 2009 3:47 pm    Post subject:
Reply with quote

Hi Anuj,

Quote:
... instead I use UCC11RMS with TYPRUM=F (PARM=F) as first step in each JCL ...

I guess this is related to CA - Jobtrac. Will this step delete datasets found with DISP as (NEW, ... , ...) in the JCL?

If so, you are DELETEing datasets anyway... So, this DELETE will use what MVS service? possibly IDCAMS DELETE or BR14 with (,DELETE,) as DISP or any other? icon_neutral.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Sun Mar 22, 2009 11:58 pm    Post subject:
Reply with quote

Hi,

yes this is to do with CA-7...umm...I would need to visit my friend's shop to understand if this (what is being said in this thread) is the case at other places..I'm quite surprised . . .
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Mon Mar 23, 2009 1:30 am    Post subject: Reply to: Searching and deleting a dataset created in the JC
Reply with quote

Quote:
So, this DELETE will use what MVS service? possibly IDCAMS DELETE or BR14 with (,DELETE,) as DISP or any other?


if You are curious on how to do it ( source code provided ) ...
look at cbt file 183 which among other goodies contains ...
Quote:
CLEANUP Assembler program. Automatically searches the MVS
catalog for non-GDG data sets that will be created
in subsequent steps of your job and deletes them.
HSM-migrated data sets are deleted with HDELETE.

//MYJOB JOB acct#
//*
//CLEANUP EXEC PGM=CLEANUP
//*
//STEP1 EXEC PGM=MYPROG1
//OUTDD DD DSN=MY.FILE1,DISP=(,CATLG)
//STEP2 EXEC PGM=MYPROG2
//OUTDD DD DSN=MY.FILE2,DISP=(,CATLG)

Can also be executed as the LAST step of a job to
delete non-GDG data sets that were created during
job execution.


http://gsf-soft.com/Freeware/
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 Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am


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