Page 1 of 2

SAVE in VIEW mode

PostPosted: Thu Sep 25, 2008 1:06 pm
by kamal
I have opened a member of a PDS in view mode.
I know I can save the changes in view mode by replace .zf .zl membername.

To avoid typing this everytime;I thought of having an ISPF EDIT macro.
So I put following macro (got from some forum :-) )

/*REXX */                                                       
/* EDIT MACRO */                                                 
/* THIS MACRO CAN BE USED TO SAVE A MEMBER/PS IN VIEW MODE */   
"ISREDIT MACRO"                                                 
"ISREDIT (DATASET) = DATASET"                                   
"ISREDIT (MEMBER)  = MEMBER"                                     
DATASET="'"||DATASET||"'"                                       
SAY DATASET                                                     
IF MEMBER = '' THEN                                             
   "ISREDIT REPLACE .ZF .ZL "DATASET                             
ELSE                                                             
   "ISREDIT REPLACE .ZF .ZL "MEMBER   


Though this code is not giving any error ; it's not doing the expected job too.

Also the result of
SAY DATASET                                                     

is
'DATASET' insted of the name of dataset/member.
Please suggest.

Re: SAVE in VIEW mode

PostPosted: Fri Sep 26, 2008 2:59 am
by dick scherrer
Hello,

How are you invoking your rexx code? Possibly TSO YORMACRO?

If your macro was somehow executed in tso (rather than ispf) it would not even know it was executed from within an edited file.

Re: SAVE in VIEW mode

PostPosted: Mon Sep 29, 2008 12:52 pm
by kamal
I have saved it in CLIST with membarname VSAVE.
Am viewing a PDS member using 3.4/v. After doing few changes;on the command line I type TSO VSAVE.
Isn't it the right way ? Please guide.

Re: SAVE in VIEW mode

PostPosted: Mon Sep 29, 2008 3:00 pm
by mohit_rathi
I guess you have to use.. type in just VSAVE
and not TSO VSAVE

later your code is prompting you withthe dataset name...
hope this shall help...:)
Thanks,
Mohit

Re: SAVE in VIEW mode

PostPosted: Sat Dec 10, 2011 6:47 pm
by John12
Could you please provide me the exact rexx code.I am getting the same error as you are getting and i am unable to detect the error.

My requirement is:

The REXX program should in turn execute the following steps.

1. Open any of the member in view mode.
2. Enter the command ‘BKUP’ in command line and press Enter.
3. Take the backup of the member and save it in PDS with the name of PDSname.BACKUP. If the backup PDS does not exist please create the backup PDS and then copy the member.
4. When successful, display the message ‘Member xxxx backed up’. When not successful, display the message ‘Member xxxx not backed up. Error!!!!’

Thanks,

Re: SAVE in VIEW mode

PostPosted: Sat Dec 10, 2011 8:18 pm
by enrico-sorichetti
Could you please provide me the exact rexx code.
My requirement is:
... ...


do you have any reason to think that somebody is going to develop and test something suited to Your requirement ?

remember ... answering is
on our ow time
free of charge

and... usually
the code snippets are just that... snippets of code from past experiences and the personal tool's chest of the good soul helping You

to ask anybody to develop something specific for Your requirement is at least improper

Re: SAVE in VIEW mode

PostPosted: Sat Dec 10, 2011 8:44 pm
by John12
sorry to say then i can not understand why this forum is here.I just asked my question ,if somebody can help then it will help me otherwise there is no issue but
never expected this type of reply.Any ways thanks for your comment.

Re: SAVE in VIEW mode

PostPosted: Sat Dec 10, 2011 8:52 pm
by Robert Sample
If you need HELP, that is one thing. But asking
Could you please provide me the exact rexx code.
is quite a different thing -- you are not asking for help, you are asking to have a programming job done for you. What you have asked for can be provided, but typically you'll have to pay the daily going rate for a professional's time -- and I've seen rates ranging from $800 per day and up in previous posts.

Re: SAVE in VIEW mode

PostPosted: Sat Dec 10, 2011 9:05 pm
by enrico-sorichetti
never expected this type of reply.

the usual whining from a spoiled kid who does not understand the difference from
(1) somebody helping and
(2) somebody doing the job You are getting paid for

posting Your code and ask why it does not work
falls into case (1) and is a reasonable request
but... asking
Could you please provide me the exact rexx code.

falls into case (2) and it id frowned upon on most forums

and if You cannot understand the difference Your chances of getting any help on any forum are quite negligible

to make the most out of the questions You ask it would be useful for You to read and meditate on
How to ask questions the smart way here
http://catb.org/~esr/faqs/smart-questions.html

Re: SAVE in VIEW mode

PostPosted: Sat Dec 10, 2011 10:22 pm
by John12
Hi all,
sorry If I make u feel that I want to do my work by your time and effort.Honestly speaking I was needing help.If you can help then it will be gr8.
Below is my rexx code.Although this code is not giving any error ; it's not doing the expected job too.Please help me by guiding me where is the error lying in my below rexx code.

/*REXX*/
"ISREDIT MACRO "
"ISPEXEC CONTROL ERRORS RETURN"
X = MSG("OFF")
"ISREDIT (PDSNAME) = DATASET" Note: I have mentioned my PDS name in the DATASET field
"ISREDIT (MEMNAME) = MEMBER" Note: I have mentioned my PDS member name in the MEMBER field who has been opened in view mode and
VPDS = "'"PDSNAME"("MEMNAME")'" needs to be copied to new member name in the same PDS dataset.
Y = LISTDSI("'"PDSNAME"'")
IF SYSDSORG = "PO" THEN
DO
"ISREDIT REPL .ZF .ZL " MEMNAME
IF RC = 0 THEN
ZEDLMSG = MEMNAME 'SAVED!'
ELSE
ZEDLMSG = MEMNAME ' NOT SAVED!'
"ISPEXEC SETMSG MSG(ISRZ001)"
END

Sorry if inconvenience caused.
Thanks