IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to change the Address environment in E35


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 4:12 pm
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
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 4:47 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 6:03 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
Search our Forums:

Back to Top