I wrote this job to convert a bunch of PDSs to PDSEs. I am using variable 
(ALTERRC) to "reset condition codes" for each invocation of the proc. It works. 
Is there a better way to do this? Maybe a way I could do something and then use 
the COND parameter on the COPY step?

//PDS2PDSE JOB CLASS=S,MSGCLASS=Q                                       00001007
//*                                                                     00001109
//* DEFINE SYMBOLS. NEEDED IN ORDER TO USE SYMBOLS IN SYSIN             00001207
// EXPORT SYMLIST=(DSNAME1)                                             00001309
// EXPORT SYMLIST=(VOLSER1)                                             00001409
//*                                                                     00001509
//* PROC TO BE CALLED FOR EACH DATASET TO BE CONVERTED                  00001609
//CONVERT  PROC                                                         00001707
//*                                                                     00001809
//* SET SYMBOLS. NEEDED IN ORDER TO USE SYMBOLS IN SYSIN                00002109
// SET DSNAME1=&N1                                                      00002209
// SET VOLSER1=&V1                                                      00002309
//*                                                                     00002409
//* VARIBLE TO RESET TO 0 FOR EACH INVOCATION OF PROC.                  00002509
// SET ALTERRC=0                                                        00002609
//*                                                                     00002709
//* ALTER DSN TO *.OLD NAME                                             00032809
//ALTER    EXEC PGM=IDCAMS                                              00032909
//SYSPRINT DD SYSOUT=*                                                  00033009
//SYSIN    DD *,SYMBOLS=JCLONLY                                         00033109
ALTER -                                                                00033209
&DSNAME1 -                                                             00033309
NEWNAME(&DSNAME1..OLD)                                                 00033409
/*                                                                      00033509
//*                                                                     00033609
//* CHECK ALTER RC. SET VARIBLE TO RC VALUE OR LEAVE SET TO 0.          00033709
// IF (ALTER.RC > 4) THEN                                               00033809
// SET ALTERRC=ALTER.RC                                                 00033909
// ENDIF                                                                00034009
//*                                                                     00034109
//* COPY PDS TO PDSE. ONLY DO IF RENAME WAS SUCCESSFUL.                 00034209
// IF (&ALTERRC < 4) THEN                                               00034309
//COPY     EXEC PGM=IEBCOPY                                             00035009
//SYSPRINT DD  SYSOUT=*                                                 00040000
//SYSUT1   DD  DSNAME=&DSNAME1..OLD,DISP=SHR                            00050007
//SYSUT2   DD  DSNAME=&DSNAME1,                                         00060007
//          LIKE=&DSNAME1..OLD,UNIT=SYSALLDA,                           00070007
//          DISP=(NEW,CATLG),DSNTYPE=LIBRARY ,VOL=SER=&VOLSER1          00080011
// ENDIF                                                                00081009
// PEND                                                                 00090007
//*                                                                     00090109
//* CALL PROC FOR EACH DATASET                                          00091007
//STEP01   EXEC CONVERT,N1=FFM.DVLP.LOADLIB,V1=A90362                   00093012
.
... more datasets
.
//                                                                      00102109

//* Peter Ten Eyck
//* Senior Systems Programmer
//* American National
//


________________________________

American National has changed its email addresses to 
firstname.lastn...@americannational.com. Please update my email address in your 
contact list, if applicable, at your earliest convenience.

Confidentiality: This transmission, including any attachments, is solely for 
the use of the intended recipient(s). This transmission may contain information 
that is confidential or otherwise protected from disclosure. The use or 
disclosure of the information contained in this transmission, including any 
attachments, for any purpose other than that intended by its transmittal is 
strictly prohibited. Unauthorized interception of this email is a violation of 
federal criminal law. If you are not an intended recipient of this 
transmission, please immediately destroy all copies received and notify the 
sender.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to