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 use 'SAVE' command in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to use 'SAVE' command in REXX
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 20, 2008 7:17 pm    Post subject: Re: How to use 'SAVE' command in REXX
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 20, 2008 7:25 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 20, 2008 7:53 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Aug 20, 2008 7:58 pm    Post subject: Reply to: How to use 'SAVE' command in REXX
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 20, 2008 8:02 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 20, 2008 8:20 pm    Post subject:
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    Post subject:
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    Post subject: could you tell me the code
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: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 29, 2008 6:35 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: How to use 'SAVE' command in REXX
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Nov 28, 2011 4:06 pm    Post subject: Reply to: How to use 'SAVE' command in REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Nov 28, 2011 4:10 pm    Post subject: Reply to: How to use 'SAVE' command in REXX
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Mon Nov 28, 2011 4:36 pm    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Mon Nov 28, 2011 8:16 pm    Post subject: Re: Reply to: How to use 'SAVE' command in REXX
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: 1715
Location: UK

PostPosted: Tue Nov 29, 2011 1:49 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am


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