Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I compress a PDS

Status
Not open for further replies.

daryani

Programmer
Aug 28, 2003
5
How do I compress a PDS using rexx?
 
IEBCOPY, an IBM Type-I utility.


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
To elaborate on Frank's response:

You could SUBmit the below job or use File tailoring in REXX to do the compression,

Code:
//STEP1    EXEC  PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//IN       DD DISP=SHR,DSN=YOUR.WANT.TO.COMPRESS.PDS
//OUT      DD DISP=SHR,DSN=YOUR.WANT.TO.COMPRESS.PDS
//SYSUT3   DD DSN=&TEMFILE,DISP=(,DELETE),
//            SPACE=(CYL,10)),UNIT=SYSDA
//SYSIN    DD *
           COPY OUTDD=OUT,INDD=IN
 
Hello Daryani,

Try this code :


/* REXX */

MESSAGE_SETTING = MSG("OFF")

DATASET1 = USERID()!!'.COMP.LIST'
DATASET2 = XXXX.XXXX.XXXX <=== Library you want to compress

DATASET3 = USERID()!!'.COMP.SYSIN'


&quot;FREE F(SYSIN SYSPRINT SYSUT2)&quot;


&quot;ALLOC F(SYSIN) DA('&quot;DATASET3&quot;')&quot;,
&quot;SPACE(20,20) TRACKS UNIT(DISK) LRECL(80)&quot;,
&quot;BLKSIZE(8000) RECFM(F B) DSORG(PS) NEW CATALOG VOLUME(EPQW01)&quot;

LIGNE.1 = COPY INDD=SYSUT2,OUTDD=SYSUT2

LIGNE.0 = 1

&quot;EXECIO 0 DISKW SYSIN (OPEN&quot;

&quot;EXECIO * DISKW SYSIN (STEM LIGNE. FINIS&quot;

&quot;ALLOC F(SYSPRINT) DA('&quot;DATASET1&quot;')&quot;,
&quot;SPACE(95,95) UNIT(DISK) LRECL(121)&quot;,
&quot;BLKSIZE(121) RECFM(F B A) DSORG(PS) NEW DELETE VOLUME (EPQW03)&quot;


&quot;ALLOC DA('&quot;DATASET2&quot;') F(SYSUT2) SHR&quot;

&quot;CALL 'SYS1.LINKLIB(IEBCOPY)'&quot;

IF RC ^= 0 THEN
DO

SAY '** Problem ' RC 'IN THE COMPRESS OF' DATASET2 ' ** '

EXIT
END
&quot;FREE F(SYSIN SYSPRINT SYSUT2)&quot;

EXIT

Regards,

Tzu.
 
I need to copy a dataset a GDG without using COPY command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top