SAVE in VIEW mode



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

SAVE in VIEW mode

Postby kamal » Thu Sep 25, 2008 1:06 pm

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.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SAVE in VIEW mode

Postby dick scherrer » Fri Sep 26, 2008 2:59 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SAVE in VIEW mode

Postby kamal » Mon Sep 29, 2008 12:52 pm

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.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SAVE in VIEW mode

Postby mohit_rathi » Mon Sep 29, 2008 3:00 pm

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
mohit_rathi
 
Posts: 5
Joined: Mon Jul 21, 2008 11:42 am
Has thanked: 0 time
Been thanked: 0 time

Re: SAVE in VIEW mode

Postby John12 » Sat Dec 10, 2011 6:47 pm

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,
John12
 
Posts: 4
Joined: Sat Dec 10, 2011 6:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SAVE in VIEW mode

Postby enrico-sorichetti » Sat Dec 10, 2011 8:18 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: SAVE in VIEW mode

Postby John12 » Sat Dec 10, 2011 8:44 pm

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.
John12
 
Posts: 4
Joined: Sat Dec 10, 2011 6:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SAVE in VIEW mode

Postby Robert Sample » Sat Dec 10, 2011 8:52 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: SAVE in VIEW mode

Postby enrico-sorichetti » Sat Dec 10, 2011 9:05 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: SAVE in VIEW mode

Postby John12 » Sat Dec 10, 2011 10:22 pm

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
John12
 
Posts: 4
Joined: Sat Dec 10, 2011 6:02 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post