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

How to use 'SAVE' command in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Wed Aug 20, 2008 6:55 pm
Reply with quote

Hi,

SAVE is a command to get list of members, , size, change date etc in a file(userid.somename.member). (Got to know about this command in some other post in this forum)

I want to run this command in a REXX program. I have tried it using like a TSO command command but it did not work. Please help me using this command.

Basically I need to the change date and time of the members based on which i have to do further processing.

Can anyone suggest any other way to save the change date and time.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 7:17 pm
Reply with quote

nkumar wrote:

SAVE is a command to get list of members, , size, change date etc in a file(userid.somename.member). (Got to know about this command in some other post in this forum)

SAVE is a command to SAVE the data of the current session. Well, it has been at every site that I have worked in.

Quote:
I want to run this command in a REXX program. I have tried it using like a TSO command command but it did not work. Please help me using this command.

It did not work is rather a generic statement - could you please provide details of any messages issued.

Quote:
Basically I need to the change date and time of the members based on which i have to do further processing.

Do you wish to retrieve the last changed date /time or update it ?

Quote:
Can anyone suggest any other way to save the change date and time.

How do you mean save it ?
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Wed Aug 20, 2008 7:21 pm
Reply with quote

I wish to retrieve the last changed date and time and based on this information I have to take certain decision.

I got following error when i tried to use it like a TSO command -

IKJ56500I COMMAND SAVE NOT FOUND
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 7:25 pm
Reply with quote

Where do you type 'SAVE' to retrieve the data and it works ?
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Wed Aug 20, 2008 7:37 pm
Reply with quote

We nned to enter the SAVE command on COMMAND LINE after entering the PDS(where member names are shown).
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 7:53 pm
Reply with quote

You can use SAS or REXX to interrogate the PDS directly
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Aug 20, 2008 7:58 pm
Reply with quote

Nitesh, why don't we start this whole topic from the beginning. Rather than telling us what doesn't work, why don't you clearly state what it is you want to do. Nothing in your original post sounds like typical REXX or TSO/E, so you've lost me. I'm vaguely thinking that you need to call some ISPF dialog functions, but I'm not sure.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 8:02 pm
Reply with quote

A snippet that I have collected from somewhere

Code:

/* REXX *** LIST A PDS AND GET THE LAST UPDATE DATE / TIME           */
LIB = "your PDS name"                                                   
MEM= ' '                                                               
LMRC = 0                                                               
ADDRESS ISPEXEC                                                       
"LMINIT DATAID(PDS) DATASET('"LIB"')"                                 
"LMOPEN DATAID("PDS")"                                                 
DO WHILE LMRC = 0                                                     
    SAY MEM ZLC4DATE ZLM4DATE ZLMTIME ZLMSEC ZLUSER '.....'           
   "LMMLIST DATAID("PDS") OPTION(LIST) MEMBER(MEM) STATS(YES)"         
   LMRC=RC                                                             
   END                                                                 
ADDRESS ISPEXEC "LMMLIST DATAID("PDS") OPTION(FREE)"                   
ADDRESS ISPEXEC "LMCLOSE DATAID("PDS")"                               
SAY CENTER("*** END ***",80)                                           
EXIT 0
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Wed Aug 20, 2008 8:04 pm
Reply with quote

Superk,

I have a very simple query. I want to retrieve the change date & time of all the modules in a particular PDS in a PS. I will use this PS for some other processing.

Let me know if you want me to make it more simple.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 8:20 pm
Reply with quote

nkumar wrote:
Superk,
I have a very simple query. I want to retrieve the change date & time of all the modules in a particular PDS in a PS. I will use this PS for some other processing.
Let me know if you want me to make it more simple.

Well, it would certainly have made life a lot easier if you had described your request in the way that you have just redescribed it for superk.

Getting the question exact at the firrst post is probably the most important part of your post. It took three or four Q&A sessions to get what you wanted and to be able to help you.
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Wed Aug 20, 2008 8:29 pm
Reply with quote

Thanks Expat for the code. it is perfectly working for me and this is what I was wanted.

I applogize for the initial confusion.

Thanks
Back to top
View user's profile Send private message
pradeepkit
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 60
Location: chennai

PostPosted: Fri Aug 29, 2008 6:12 pm
Reply with quote

for the same query you were having i am also struggling over here as the code given is only displaying the dates and all other stat i am not able to write into the ps please help me what code you tried
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 29, 2008 6:35 pm
Reply with quote

Pradeep,

Post your code and let us see why you do not get the desired results.
Back to top
View user's profile Send private message
nkumar

New User


Joined: 09 Mar 2008
Posts: 28
Location: USA

PostPosted: Fri Aug 29, 2008 7:15 pm
Reply with quote

Hi Pradeep, Here is the part of code which I used. Might help.
Code:


ADDRESS ISPEXEC
"LMINIT DATAID(PDS) DATASET('"LIB"')"
"LMOPEN DATAID("PDS")"

DO WHILE LMRC = 0
   "LMMLIST DATAID("PDS") OPTION(LIST) MEMBER(MEM) STATS(YES)"
   /*SAY MEM ZLC4DATE ZLM4DATE ZLMTIME ZLMSEC ZLUSER */
   CMEMBER = " "
   PARSE VAR ZLM4DATE YEAR "/" MONTH "/" DAY
   PARSE VAR ZLMTIME  HOUR ":" MINUTE
   PARSE VAR ZLMSEC   SECOND

/************************************************************/
/* COMAPRE THE CHANGE DATE OF MODULES WITH LAST UPDATE DATE */
/************************************************************/
IF YEAR > LYEAR THEN CMEMBER = MEM
ELSE DO
       IF YEAR = LYEAR THEN
        DO
         IF MONTH > LMONTH THEN CMEMBER = MEM
         ELSE DO
                IF MONTH = LMONTH THEN
                DO
                IF DAY > LDAY THEN CMEMBER = MEM
                ELSE DO
                      IF DAY = LDAY THEN
                        DO
                          IF HOUR > LHOUR THEN CEMEMBER = MEM
                          ELSE DO
                                 IF HOUR = LHOUR THEN
                                   DO
                                     IF MINUTE > LMINUTE THEN
                                        CMEMBER = MEM
                                     ELSE DO
                                            IF MINUTE = LMINUTE THEN
                                            DO
                                              IF SECOND > LSECOND THEN
                                                CMEMBER = MEM
                                              ELSE CMEMBER = " "
                                            END
                                          END
                                   END
                            END
                        END
                     END
                 END
              END
          END
     END
/************************************************************/
/* STORE THE MODULE IF IT IS CHANGED AFTER LAST REFRESH     */
/************************************************************/
   IF CMEMBER = " " | CMEMBER = 'CMEMBER' THEN NOP
   ELSE
     DO
       M = M + 1
       CMEM.M = "SRCHFOR " || "'" || CMEMBER || "'"
       IF M = 1 THEN
         DO
           TMEM   = CMEMBER
           TDATE  = YEAR || MONTH  || DAY
           TTIME  = HOUR || MINUTE || SECOND
           TTEMP  = TDATE || TTIME
         END
       ELSE
         DO
           PMEM   = CMEMBER
           PDATE  = YEAR || MONTH  || DAY
           PTIME  = HOUR || MINUTE || SECOND
           PTEMP  = PDATE || PTIME
           IF PTEMP > TTEMP  THEN
             DO
               TMEM   = PMEM
               TDATE  = PDATE
               TTIME  = PTIME
               TTEMP  = TDATE || TTIME
             END
         END
     END
   LMRC=RC
END

ADDRESS ISPEXEC "LMMLIST DATAID("PDS") OPTION(FREE)"
ADDRESS ISPEXEC "LMCLOSE DATAID("PDS")"

/************************************************************/
/* UPDATE CPYBOOKS WITH LAST REFRESH DATE IF ANY CHANGED    */
/* MODULE IS FOUND.
/************************************************************/
IF M = 0 THEN
 DO
   MSG1 = " NO COPYBOOK CHANGE FOUND"
   INPUT = " "
   SIGNAL BEGIN
 END

IF M > 0 THEN
  DO
    P = M + 1
    CMEM.P = "/* " || TMEM " CPY ACITVE " || TDATE || " " ||TTIME
    ADDRESS TSO
    "ALLOC DDN(OUTFILE) DSN('NCDPNXK.ASSIGN1.SRC(CPYBOOKS)') SHR REUSE"
    "EXECIO * DISKW OUTFILE(FINIS STEM CMEM."
    "FREE DDN(OUTFILE)" /*- RELEASES THE DATASET */
  END
Back to top
View user's profile Send private message
smileseenu

New User


Joined: 27 Sep 2006
Posts: 13
Location: India

PostPosted: Mon Nov 28, 2011 3:18 pm
Reply with quote

i tried the same with the PDS that has cobol load its not working. i need to get the load size ...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 28, 2011 4:06 pm
Reply with quote

Please don't tag your question on to the end of a 3-year-old topic.

If you can explain what you want, what you have tried and how it is not working, you are more likely to get somewhere.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Nov 28, 2011 4:10 pm
Reply with quote

apart tagging on an old topic..
the question and the subject might be clear to You, but frankly , it does not make any sense to anybody else

wiser to reword it, with a proper subject description and post it to the proper forum section , REXX or ISPF
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Nov 28, 2011 4:36 pm
Reply with quote

(Why) Isn't there a way to automatically lock threads 1/3/6/12 months after the last post to them?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Nov 28, 2011 8:16 pm
Reply with quote

smileseenu wrote:
i tried the same with the PDS that has cobol load its not working. i need to get the load size ...

Because the directory entries of load libraries are quite different from those of source libraries.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Nov 29, 2011 1:49 am
Reply with quote

After 5 years you should know that 'its not working' is a useless piece of information. Also - you should not tag onto an old post - start a new one referencing the old one. hah - posted that before reading page 2. Duh!
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top