View previous topic :: View next topic
|
Author |
Message |
vickey_tcs
New User
Joined: 14 Mar 2009 Posts: 5 Location: At Desk
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
By any chance do you have CA-Jobtrac (Scheduler) available to you? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Guess I'm missing something here? |
Me too . . .
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 . . . |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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.
|
gsf-soft.com/Freeware/ |
|
Back to top |
|
|
|