On Thu, 8 Apr 2010 06:35:15 -0500, Angel-Luis Dominguez 
<[email protected]> wrote:

>We use this as first step. If the file exits, it is deleted. If don't exits, 
>RC=0 in
>the same way.
>
>//PASOBOR  EXEC PGM=IEFBR14
>//D1     DD   DISP=(MOD,DELETE),UNIT=SYSALLDA,
>//       SPACE=(1,1),
>//       DSN=USTS.U0Z72B6.????.????????
>
>Regards
>
>Angel Luis Domínguez
>sysprog - Spain
>

BTW, SPACE=(1,1) should be SPACE=(TRK,(1,1)).

If the data set does not already exist, DISP=MOD is processed as DISP=NEW, 
which causes I/O to be initiated to access the VTOC and allocate disk space, 
space that will be unallocated at the end of the step.

Using IDCAMS is more performant:
//PASOBOR EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
  LISTCAT ENTRY(USTS.U0Z72B6.????.????????)
  IF LASTCC=0 THEN DELETE USTS.U0Z72B6.????.????????
  SET MAXCC=0
/*
//

Regards,

Michel Castelein
z/OS instructor

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to