View previous topic :: View next topic
|
Author |
Message |
psriv20 Currently Banned New User
Joined: 25 May 2009 Posts: 19 Location: Pune
|
|
|
|
Hi,
Can we take the backup and delete the source file in single step? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
yes...
see the dfdss/adrdssu manuals |
|
Back to top |
|
|
psriv20 Currently Banned New User
Joined: 25 May 2009 Posts: 19 Location: Pune
|
|
|
|
Please explain me ??If possible provide me code also.
I have one flat file and i have to take the bakup from this file and then delete it.All activities should happened in single step. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
If possible provide me code also. |
What did you try by your own? |
|
Back to top |
|
|
psriv20 Currently Banned New User
Joined: 25 May 2009 Posts: 19 Location: Pune
|
|
|
|
I can do it in two step but unable to do in single step. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Did you read the 2nd topic that Enrico provided you a link to ? If you did, you would have found a good example of the JCL required to do this
Click HERE to RTFM on how to use the control statements.
When you have problems AFTER you have tried using DFdss (PGM=ADRDSSU), please let us know and we will try to help. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Why can't a simple DISP=(OLD,DELETE,KEEP) be used for the input file? |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
//DSSDUMP EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//TAPE1 DD DSN=BACKUP.NAME,DISP=(,CATLG),
// SPACE=(CYL,(750,750),RLSE),VOL=(,,,59)
//SYSIN DD *
DUMP ODD(TAPE1) ALLE ALLD(*) COM OPT(4) SPHERE DELETE PURGE -
DS(INC( -
DSNAME.ONE -
DSNAME.TWO -
etc....
)) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Where is the "backup" to be written (which media)? It the backup is also a dasd file, you might consider simply renaming the file. . . |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
psriv20 might be long gone by now, but why was ADRDSSU suggested? Why wasn't my question of Aug 31 not answered? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Hi Terry!
because the original question was ....
Quote: |
Can we take the backup and delete the source file in single step? |
|
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
Terry's idea is a sensible one too. The problem with DFDSS is it won't pick up the file if it's migrated by DFHSM or equivalent product.
The following illustrates Terry's idea, assuming the file is not VSAM. The presence of the DD's means the source file would be recalled from DFHSM if it was migrated.
//COPY EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IN DD DSN=SOURCE.NAME,DISP=(OLD,DELETE,KEEP)
//OUT DD DSN=BACKUP.NAME,DISP=(,CATLG),
// LIKE=SOURCE.NAME
//SYSIN DD *
REPRO IFILE(IN) OFILE(OUT) |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Yep,
but we are just speculating , the original question was quite clear,
my/our hope is that the people asking are aware of the environment in which they want things to happen(*)
- but 99% of the time my/our hopes are shattered
(*) if a backup is needed then...
if a dataset is under automated management the whole topic should be canceled
or the management policy reviewed ( to take the proper backups)
if the dataset has been migrated without a backup there must be reasons
which I do not want to investigate |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
personally I'm against using DISP=(OLD,DELETE,KEEP) to backup a file, some utlities such as IDCAMS, IEBGENER etc are very dangerous, an incorrect or missing DDNAME such as SYSPRINT will result in a RC greater than 0, thus blowing away the dataset without copying it.
I would rather delete the file in a second step ie if backup step is successful then delete it.
But then we have this one step mentality which I can never understand.
Gerry |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Quote: |
But then we have this one step mentality which I can never understand. |
Agree. Better to spend a little extra time or additional steps and be safe than sorry.
enrico, what did you do? Ban yourself? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
gcicchet wrote: |
But then we have this one step mentality which I can never understand.
|
Hi Gerry,
it has to do with efficiency. E.g. OPC will work faster processing 1 step jobs, in case of JCL errors with a job stream of e.g. 25 steps its much more difficult to solve jcl errors, program abends if temporary datasets are used. So catalogued datsets are used and deleted at run end.
Beside that JESx is processing 1 step jobs more efficient.
But mostly it has to do with easier job restarts. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But mostly it has to do with easier job restarts. |
I believe not. . . I believe this has more to do with people who are lazy and/or are only marginally competent.
If there is any serious perfomance implication due to OPC processing, i suspect the system is in terrible condition.
Quote: |
in case of JCL errors with a job stream of e.g. 25 steps its much more difficult to solve jcl errors, |
Sorry, but this makes no sense. There is no good reason for a production job to fail with a jcl error. There should be no complex restart issues. Done properly, jcl can be restarted from the beginning with little or from the abended step with no extra work.
As i mentioned, these situations come up because the "stuff" turned over is incorrect or incomlete or done by people who cannot or will not do decent work. More ana more clueless managers compound this as well. |
|
Back to top |
|
|
|