Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to change the Address environment in E35

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Hariprasad_Pargunan

New User


Joined: 08 Jan 2009
Posts: 20
Location: Chennai

PostPosted: Mon Jul 12, 2010 4:00 pm    Post subject: How to change the Address environment in E35
Reply with quote

Hi,

I have an input file whose LRECL is 44 and RECFM is 80.

This input file contains Thousads of dataset names, for all the datasets, I am required to get the SYSREFDATE using LISTDSI function. Since the I/P contains huge volume of records, I decided to write an user Exit routine in REXX.

The resultant Output dataset would contain the following information
Dataset name (44 Bytes) and SYSREFDATE (yyyy/ddd => 8 bytes) totally 52 bytes long fixed block file.

I have written the following SORT utility for this:-

Code:

//STEP1      EXEC  PGM=SORT                               
//SORTIN     DD    DSN=USERID.INPUT,DISP=SHR   
//*                                                       
//MODLIB     DD DSN=USERID.REXX,DISP=SHR                 
//*                                                       
//SORTOUT    DD DSN=USERID.OUTPUT,DISP=(,CATLG,),
//  SPACE=(CYL,(50,50),RLSE)                             
//*                                                       
//SYSIN      DD *                                         
 SORT FIELDS=COPY                                         
 MODS E35=(REFDATE,52,MODLIB,X)                         
 END                                                     
/*                                                       
//SYSOUT     DD SYSOUT=*                                 
//SYSTSPRT   DD SYSOUT=*                                 


Code in USERID.REXX(REFDATE):-
Code:

/*REXX*/                               
ADDRESS "SYNCREXX" "GIVE"             
IF LENGTH(SYRECORD) <> 0 THEN         
   DO                                 
     SYACTION = "REPLACE"             
     FILE_NAME = SUBSTR(SYRECORD,1,44)
     FILE_NAME = STRIP(FILE_NAME)     
     ADDRESS "TSO"                   
     X = LISTDSI("'"FILE_NAME"'")     
     IF X = 0 THEN                     
     DO                               
        REF_DATE = SYSREFDATE         
        ADDRESS "SYNCREXX"             
        SYRECORD = SYRECORD || REF_DATE
     END                               
   END                                 
ELSE SYACTION = "CLOSE"               
ADDRESS "SYNCREXX" "TAKE"             
EXIT


while executing this code I am getting the following error in SYSTSPRT.

Code:

    10 +++   X = LISTDSI("'"FILE_NAME"'")                 
IRX0043I Error running MGMTCLAS, line 10: Routine not found


Could someone please help me on this issue.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 12, 2010 4:12 pm    Post subject:
Reply with quote

Can you explain to me why on earth you want to run the REXX code from within a sort step.

Perhaps if you explained exactly what it is that you want to do, then someone might be more able to help you.

A tip - I would consider the use of NORECALL in your REXX code, else you may well have a couple of storage guys turn up at your desk wearing masks and wielding heavy things to hit you with.

Have you considered using IGGCSIRX for this.

UPDATE My error - CSI will work for creation date but not last referenced date.
Back to top
View user's profile Send private message
Hariprasad_Pargunan

New User


Joined: 08 Jan 2009
Posts: 20
Location: Chennai

PostPosted: Mon Jul 12, 2010 4:30 pm    Post subject: Reply to: How to change the Address environment in E35
Reply with quote

Hi Expact,

1) The Input file contains huge volume of records. I believe even REXX would not be able to store such millions of records in the buffer. So I chose this option.

2) I have a dataset which contains all the file names. I need to extract only the last reference date for these datasets.

3) Thanks, I will definitely use NORECALL option in LISTDSI function

4) I am sorry, I am not aware of the utility IGGCSIRX.

Please let me know if you need even more details.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 12, 2010 4:34 pm    Post subject:
Reply with quote

SYSREFDATE can be updated by someone simply entering I for the ds in 3.4.

this looks suspiciously like a delete methodology.

the fact, as expat pointed out, that someone is invoking REXX from SORT for thousands of records (thousands of invokations),
sorta tells me, little experience.

this looks like an inexperienced attempt to reduce the number of ds based on laste reference date.

admittedly, I am not a systems programmer,
but I can not believe that the systems boys have to go thru this type of BS
to solve every site's problem: users not cleaning up their garbage.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 12, 2010 4:47 pm    Post subject:
Reply with quote

If you need to process vast amounts of records using REXX I will usually read in a specific number of records at a time, process those, and then read in the next batch for processing.

As amended above, IGGCSIRX will not give the last accessed date.

As mentioned by Dick, is this a delete some datasets exercise to free up DASD space and/or HSM deletes. If so, your storage team should have taken care of all of this via automated processes.

So why do you need the last referenced date, and maybe better suggestions can be made.

P.S. It is Expat - NOT Expact
Back to top
View user's profile Send private message
Hariprasad_Pargunan

New User


Joined: 08 Jan 2009
Posts: 20
Location: Chennai

PostPosted: Mon Jul 12, 2010 5:21 pm    Post subject: Reply to: How to change the Address environment in E35
Reply with quote

Hi Expat,

We need to generate a report with the given high level qualifier dataset which should contain the dataset name, Creation date, management class and last reference date for our application.

These information will then be given to the storage team for further processing. I believe based on the last ref date the dataset would be converted to tapes.

As you suggested, I will split up the records into multiple files and process it thru REXX.

I am sorry to ask you once again, but I am curious to know how to resolve this error. Could you please throw some light on this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 12, 2010 6:03 pm    Post subject:
Reply with quote

Code:
EOF = 0                                 
"EXECIO 0 DISKR DCO (OPEN)"             
DO FOREVER UNTIL(EOF)                   
   "EXECIO 25000 DISKR DCO (STEM DCOI." 
   IF RC <> 0 THEN EOF = 1               
   DO A = 1 TO DCOI.0                   
                                         
      *** PUT PROCESSING CODE HERE ***   
                                         
   END                                   
END                                     
"EXECIO 0 DISKR DCO (CLOSE)"             


There should be absolutely no need to do this. Any dataset not used for a specified number of days should automatically be migrated. I think that your management should bring some storage people with half a brain into your site, and quite quickly too.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts execute APP if they are not ADDRESS T... italo_pm CLIST & REXX 3 Fri Aug 12, 2016 2:15 am
This topic is locked: you cannot edit posts or make replies. Get and display content of an address... lind sh CICS 1 Mon Aug 08, 2016 9:18 am
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us