MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compressing a PS file in batch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
svhgk
Beginner


Joined: 14 Feb 2006
Posts: 12
Topics: 5

PostPosted: Fri Mar 10, 2006 5:33 am    Post subject: Compressing a PS file in batch Reply with quote

Hello,

We are in the process of testing 100+ jobs where in we have to run JOBs with the production data. We are facing problems due to lack of space as there are almost 1300+ output files involved/created by different JOBS. We need to have all the datasets under the same HLQs (like MYID.PROD.RUN.*). Based on the HLQs, the volumes are alloted. Upon raising this issue to the support people, we were told to compress the datasets. I am looking for a batch utility where in I can compress all these 1300+ files. I tried using IEBCOPY, but looks like this is only for compressing PDS. The following is the error message I got:-

IEB120I A VALIDATION ERROR
IEB178I NOT AN IEBCOPY UNLOADED DATA SET - 1ST PHYSICAL RECORD NOT 64 BYTES LONG
IEB1030I DDNAME A REFERS TO PDSU DATA SET ON VOLUME ADT103 NAMED ADT.TSTF.L4D.SYST.POLF.DATA.MERGED.RED01
IEB1096I NO MEMBERS MOVED IN DATA SET REFERENCED BY B
IEB151I JOB HAS TERMINATED WITH ERROR(S)
IEB147I END OF JOB - 8 WAS HIGHEST SEVERITY CODE

Any guidance in this aspect will be helpful.

Thanks,
Ganesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Fri Mar 10, 2006 9:01 am    Post subject: Reply with quote

svhgk,


You cannot COMPRESS a Sequential Dataset using IEBCOPY. You can only Compress a PDS using IEBCOPY.

Compression can achieved with SMS. Your shop can enable that by assigning the compression parameters using DATACLAS and STORCLAS parameters

Check this link. search for COMPRESS in this manual

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2D430/CCONTENTS?DT=20040624112123

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Fri Mar 10, 2006 9:16 am    Post subject: Reply with quote

Hello svhgk,

Please post your IEBCOPY control Statements

Alternatively you can do all this in two other automatic ways, rather than yours:

Option 1.- Get all the HLQs from an IDCAMS listcat output, Then Generate and execute the compress JOB. ICETOOL/DFSORT/SYNCSORT can be an alternative to generate the Compress job

Option 2.- Let Rexx do all the JOB, that is searching for all the HLQ (Look for LISTDSI Instruction, and .. LM* Ispf services ), and using your compresss criteria, just inoke IEBCOPY "in the fly"
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Mar 10, 2006 11:37 am    Post subject: Reply with quote

What exactly do you mean by "compress"? Compressing a PDS is not the same as using data compression. Do you mean just releasing free space or do you actually want to alter the data in the files so they take up less space?
Back to top
View user's profile Send private message Visit poster's website
svhgk
Beginner


Joined: 14 Feb 2006
Posts: 12
Topics: 5

PostPosted: Fri Mar 10, 2006 12:56 pm    Post subject: Reply with quote

Kolusu,

Thanks for the link. I am taking time to go thru it & find out the answer I need.

Hello German,

//STEP01A EXEC PGM=IEBCOPY
//*
//SYSPRINT DD SYSOUT=*
//A DD DSN=ADT.TSTF.L4D.SYST.POLF.DATA.MERGED.RED01,DISP=OLD
//B DD DSN=ADT.TSTF.L4D.SYST.POLF.DATA.MERGED.RED01,DISP=OLD
//*
//SYSIN DD *
COPY OUTDD=B,INDD=A
/*

Semigeezer,

What I want is yes, releasing 'free' space.

Also I have a doubt. All these files have been created with the RLSE parameter. Won't this release unused space when the JOB is over? But then 1300+ files is huge? Please correct me if I am wrong.

Thanks,
Ganesh
Back to top
View user's profile Send private message
CaptObvious
Beginner


Joined: 01 Feb 2006
Posts: 19
Topics: 1

PostPosted: Mon Mar 13, 2006 6:52 pm    Post subject: Reply with quote

Assuming they're sequential files, IEBCOPY won't do a thing for you. And if, as you say, they're being allocated with the RLSE parameter, any unused space you're allocating should become available to you.

I would be interested to see whether the space issue is because you can't allocate enough in the first extent, or you're using up the volume entirely. If, for example, your files are 64kB each, but you've allocated 1MB in the first extent, then you'll continue producing output until you have less than 1MB available in a single extent... whereas, if you had your allocation parameters set to 64kB, you'd get another 16 datasets done in that space.

But assuming that this isn't the case, and you're actually running out of DASD, you could:

1) Add more volumes to the SMS storage group.
2) Send them instead to TMM, if you're using it, or direct to tape if you're not.
Back to top
View user's profile Send private message
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Tue Mar 14, 2006 8:53 am    Post subject: Reply with quote

As posted previously, compress is meant to be in partitioned datasets ONLY, it doesn't make sense nor is possible to do it in PS.

Data is PS is stored SEQUENTIALLY, while in partitioned datasets, it is true only at the beggining. If you happen to update any member, an update copy of it will be generated at the end of it, the previously used space remains there and you won't be able to use it anymore (unless you had an alias of course). The compress preccess just reclaims those unused spaces in your dataset.

The question you should answer is why do you need to do something like this? Do you think that your PS has too much space and you do not need that much? Also you foresee a zero growth rate for your dataset? In those cases what you need is to FREE the extra space, as opposed to compress the PS Dataset.

Answering those questions may bring you back to one of my original suggestion, again with Rexx (and that is not the only way to do it!) you can determine the recfm of the dataset, and build the appropiate jobsted, whether this is a IEBCOPY compress or a space free step is another thing.
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
svhgk
Beginner


Joined: 14 Feb 2006
Posts: 12
Topics: 5

PostPosted: Wed Mar 15, 2006 7:56 am    Post subject: Reply with quote

Hello,

Sorry for my delayed reply.

CaptObvious,

I have pasted the following information of what I could get: -

Code:
                                     
Volser   SDevn  Device    Group     Cyls   Space    Free Space   Free Xtnt
                                                                           
UAT101     0153  3390-3   GRPUAT      3355   2707MB    263MB  9%      24MB
UAT102     018F  3390-3   GRPUAT      3355   2707MB    120MB  4%      15MB
UAT103     0197  3390-3   GRPUAT      3355   2707MB     90MB  3%       4MB
UAT104     0198  3390-3   GRPUAT      3355   2707MB    201MB  7%      30MB
UAT105     01AD  3390-3   GRPUAT      3355   2707MB    201MB  7%      16MB
UAT106     01BE  3390-3   GRPUAT      3355   2707MB    145MB  5%      19MB
UAT201     01DD  3390-3   GRPUAT      3355   2707MB    112MB  4%      24MB
UAT202     01DE  3390-3   GRPUAT      3355   2707MB    198MB  7%      17MB
UAT203     01DF  3390-3   GRPUAT      3355   2707MB     99MB  3%      23MB
UAT204     01F2  3390-3   GRPUAT      3355   2707MB    289MB 10%     129MB

The VOLSER is what we creating datasets on. Does this give you any insight of what the problem could be? Rolling Eyes

Note: I am not able to paste the table properly. Read the %values (like 10%,7%) as the 'free space' in the volser. The column just left to it is the free space in MB. The last column (129MB,23MB) as the 'largest free xtent' available for the VOLSER.

German,

Yes. Going by the suitability, REXX would be the best option to do. (Sorry I do not know REXX so that I can create a utility thru it. I have been using only those which are readily avaiable ones. Crying or Very sad ) But I do not have access to add my own utilities to the library Sad .
Back to top
View user's profile Send private message
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Wed Mar 15, 2006 6:09 pm    Post subject: Reply with quote

Ok Let's give it a try, this solution isn't fully tested AND there are limitations, I will point them out at the end of this post.

First of all, choose your way to..., and feel free to change my selection:
a) Compress a PDS ==> I choose IEBCOPY
b) Free unused space os PS ==> I choose ADRDSSU

I am gonna make a skel and a rexx, you may do it all from inside one rexx cmd, however using skeletons seems to be easier IMO. Having said so, the Skel will work based in TWO temp tables (built inside the rexx exec), one for PDSs and another one for PS, namely PDSs and PSs respectivelly. So my Skel (MYSKEL) looks like:

Code:

//MYUSERID JOB ,'XXXXXX.',MSGCLASS=X,CLASS=A,MSGLEVEL=(1,1)   
//*                                                           
//*    PO DATASETS = &PDSCUR                                 
//*                                                           
)SEL &PDSCUR GT 0                                             
//IEBCOPY  EXEC PGM=IEBCOPY,REGION=4M                         
//SYSPRINT   DD   SYSOUT=*                                   
//SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(30,30),RLSE)             
//SYSUT4   DD UNIT=SYSDA,SPACE=(CYL,(30,30),RLSE)             
)SET INDD = 0                                                 
)DOT PDSS                                                     
)SET INDD = &INDD + 1                                         
//I&INDD    DD DISP=SHR,DSN=&DSVAR                           
//O&INDD    DD DISP=SHR,DSN=&DSVAR                           
)ENDDOT                                                       
//SYSIN    DD *                                               
)SET INDD = 0                                                 
)DOT PDSS                                                     
)SET INDD = &INDD + 1                 
  COPY OUTDD=O&INDD,INDD=I&INDD       
)ENDDOT                               
)ENDSEL &PDSCUR GT 0                   
//*                                   
//*    PS DATASETS = &PSCUR           
//*                                   
)SEL &PSCUR GT 0                       
//ADRDSSU  EXEC PGM=ADRDSSU,REGION=4M 
//SYSPRINT   DD   SYSOUT=*             
//SYSIN    DD *                       
RELEASE -                             
)DOT PSS                               
  INCLUDE(&DSVAR) -                   
)ENDDOT                               
FORCECP(0)                             
)ENDSEL &PSCUR GT 0                   

Place this Skel in your ISPSLIB.


Now The rexx used to build the JCL(MyRexx) is:

Code:

/* rexx */                                     
/*  Rescue unused space in Datasets */         
                                               
Arg hlq .                                       
                                               
Address ISPEXEC                                 
"lmdinit listid(id) level("||hlq||")"           
If rc \= 0 then return                         
dsvar = ' '                                     
retrc = 0                                       
                                               
"TBOPEN PDSs nowrite share"                     
Select                                         
  When Rc = 0 Then nop                         
  When Rc = 8 Then Do                           
          "TBCREATE PDSs Names(Dsvar)"         
          If rc /= 0 Then Do ,                 
             Say "Problem defining Pdss table" 
             Exit 04                               
          End /* rc /= 0 */                       
       End /* Rc = 8 */                           
  Otherwise Do                                     
             Say "Problem Opening Pdss table"     
             Exit 04                               
       End /*Otherwise */                         
End                                               
                                                   
"TBOPEN PSs nowrite share"                         
Select                                             
  When Rc = 0 Then nop                             
  When Rc = 8 Then Do                             
          "TBCREATE PSs Names(Dsvar)"             
          If rc /= 0 Then Do ,                     
             Say "Problem defining Pss table"     
             Exit 04                               
          End /* rc /= 0 */                       
       End /* Rc = 8 */                           
   Otherwise Do                               
              Say "Problem Opening Pss table"
              Exit 04                         
        End /*Otherwise */                     
 End                                           
 
 Do while retrc = 0                           
                                               
    "lmdlist listid("id") option(list) ,       
                 dataset(dsvar) stats(yes)"   
                                               
    retrc = rc                                 
                                               
    if retrc /= 0 then leave                   
                                               
    Dsorg =  Strip(zdldsorg)                   
    Select                                     
        When Dsorg = "PO" Then "TBAdd PDSs"   
        When Dsorg = "PS" Then "TBAdd PSs"     
       Otherwise nop                       
   End                                     
End                                       
                                           
"TBStats PDSs RowCurr(PDSCur)"             
"TBStats PSs RowCurr(PSCur)"               
                                                                                   
"ftopen temp"                             
"ftincl MYSKEL"                           
"ftclose"                                 
"vget (ztempf) shared"                     
"edit dataset('"ztempf"')"                 
                                           
"TBEND PDSs"                               
"TBEND PSs"                               
"lmdfree listid("id")"                     
RETURN

Place this Rexx in your Sysexec or Sysproc.
This will just build and edit the JCL, but if you prefer to submit it automatically, change the line
Code:

...
"edit dataset('"ztempf"')"                 
...

by
Code:

...
"submit '"ztempf"'"
...


Finally, putting alltogether the Main JCL, by replacing your usual Batch TSO JOB, it should look like:
Code:

//XXXXXXXX  JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)     
//*                                                   
//*                                                   
//SEGJCL   EXEC PGM=IKJEFT1A,REGION=3600K,DYNAMNBR=50 
//SYSEXEC   DD  DISP=SHR,DSN=YOUR SYSEXEC             
//          DD  DISP=SHR,DSN=ISP.SISPEXEC             
//ISPSLIB   DD  DISP=SHR,DSN=YOUR SKEL DATASET         
//          DD  DSN=ISP.SISPSENU,DISP=SHR             
.....                                                 
.....                                                 
//SYSTSIN   DD  *                                     
  PROFILE NOPREFIX                                     
  ISPSTART CMD(%MYREXX 'MY.HLQ*' )                     



A word of caution here, when building JCLs, you should check for the number of DDnames in a Step, I am not checking it out, but if you have the amount of datasets you mentioned you should add that simple check or build the jcl, and split it out.

Also, since you plan to do it masivelly you should have some sort of back up just in case anything goes wrong.

Last but not least, take a look at the service guide manual, under LMDLIST, there are several other pool variables set by this service, which may be of some help to your endeavors (hint: There is even one for FREE USED SPACE)
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Mar 15, 2006 7:34 pm    Post subject: Reply with quote

I'm confused. Was the original question about PDSes or PS (sequential) data sets?

Sequentials can be stored in a compressed format using ISPF's Packed format (see the ISPF manual for services that can do this; LMCOPY, or EDIT come to mind), but then you need to use ISPF to unpack them or at least to browse or edit them.
Back to top
View user's profile Send private message Visit poster's website
svhgk
Beginner


Joined: 14 Feb 2006
Posts: 12
Topics: 5

PostPosted: Thu Mar 16, 2006 9:23 am    Post subject: Reply with quote

German,

Thanks for the REXX. I am trying it out. Shall let you know the results.

Regards,
Ganesh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group