SAVE in VIEW mode



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

Re: SAVE in VIEW mode

Postby NicC » Sat Dec 10, 2011 11:15 pm

Did you try running the REPL as a straight command on the command line - you would get the answer then.
Also - you are in a PDS so why check for PO organisation?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: SAVE in VIEW mode

Postby John12 » Sun Dec 11, 2011 12:17 am

Before coding the rexx code i tried the REPL .zf .zl command from tso command line in mainframe it is working fine as expected .But my project requirement is to run this code thru rexx program.when I will enter Enter the command ‘BKUP’ in command line and press Enter it will 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.But I am not able to do the code and also not able to find the error in my code.Would you be able to help me in guiding.I am using IF SYSDSORG = "PO" to check whether the dataset is PDS or not.

/*REXX*/
"ISREDIT MACRO "
"ISPEXEC CONTROL ERRORS RETURN"
X = MSG("OFF")
"ISREDIT (PDSNAME) = DATASET"
"ISREDIT (MEMNAME) = MEMBER"
VPDS = "'"PDSNAME"("MEMNAME")'"
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
dsname = "'xxx.REXX(BKUP)'"
ddname = "SYSPROC"
"ISPEXEC QBASELIB "ddname" ID(dslist)"
"ALLOC F("ddname") DA("dsname","dslist") SHR REU"
Exit 0

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 prino » Sun Dec 11, 2011 3:54 am

Holy crap, the whole fecking raison d'être for View is to look at data and not to modify it, or to modify it with the certainty that it cannot accidentally be saved in its modified state.

You are basically wasting our time with a requirement to make it possible to use View as Edit, may I suggest that you use Edit for this purpose in the future?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: SAVE in VIEW mode

Postby dick scherrer » Sun Dec 11, 2011 6:31 am

Hello John,

This forum (unlike many others on the web) is here to help you learn - NOT actually do the work. As you work thru getting what you want, people here will help. Often thru several iterations.

Something to be aware of is that you need to make sure that what you believe you want is practical. Why do you believe you want View to perform as Edit?
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 NicC » Sun Dec 11, 2011 11:37 am

Well, when I tried the command on the command line I got amessage saying I was unable to replace the member because it was in use i.e. I was viewing it. You can create a new member or replace the member, if it exists, in another PDS but you cannot replace the one you are actually viewing.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: SAVE in VIEW mode

Postby prino » Sun Dec 11, 2011 2:33 pm

NicC wrote:Well, when I tried the command on the command line I got amessage saying I was unable to replace the member because it was in use i.e. I was viewing it. You can create a new member or replace the member, if it exists, in another PDS but you cannot replace the one you are actually viewing.

Oh yes, you can! View doesn't take any enqueues and a "repl .zf .zl mem" where "mem" is the member currently being viewed will work. Not bothered to try the OP's stuff, but it's obvious that something else must be wrong!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: SAVE in VIEW mode

Postby NicC » Sun Dec 11, 2011 9:45 pm

Prino - I tried it before posting and that was the message I got. I'll try again though just to double check.

Just done that and it worked ok - something must have fouled up yesterday whilst I was trying it out. I am pretty certain that I WAS in view mode at the time.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Previous

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post