View previous topic :: View next topic |
Author |
Message |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Wed May 21, 2003 7:06 am Post subject: How to Open a new panel |
|
|
All,
Inside the COBOL program, we have some copybooks. Now,Im able to open this copybook,using a REXX macro, from within that program. The copybook is opened using ISPEXEC EDIT command. Hence, it opens on top of the program. Now, can I alter it to open in a different panel(window), so that I can swap across the program and the copybook.
Cheers,
Coolman.
________
design host
Last edited by coolman on Sat Feb 05, 2011 1:21 am; edited 1 time in total |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu May 22, 2003 11:10 pm Post subject: |
|
|
coolman,
Ofcourse yes. You can do that. Once I had the same issue, that too with the same kind of stuff. Opening copybooks in a different window.
Inorder to do that you need to use ISPSTRT command (Note: It is not ISPSTART. it is ISPSTRT). But If you use just one macro to do this stuff. it will be a bit difficult. Instead use two REXX routines. The first rexx routine say SHOWCOPY gets the copybook name from the cursor position or whatever and it invokes the second REXX routine DISPCOPY onto a new window.
Code the following lines in the first rexx SHOWCOPY
Code: |
"ISPEXEC VGET (ZSCRCUR, ZSCRMAX)"
CMD = 'TSO DISPCOPY '||COPYBOOK_NAME
IF ZSCRCUR < ZSCRMAX THEN
DO
"ISPEXEC SELECT PGM(ISPSTRT) PARM("CMD";)"
END
ELSE
DO
CALL DISPCOPY COPYBOOK_NAME
END
EXIT 1
|
The above code first checks whether you have sufficient no. of new screens available. If you have atleast one unused screen, it automatically displays the copybook in that new screen. If you have consumed all the screens provided to you by your shop setup, then it will open the copybook in the same window / screen as it is doing now.
All you have to do in the Second rexx routine (DISPCOPY) is get the argument (copybook name) and search in the respected libraries and display it in a panel as you do normally.
Hope this helps you,
Thanks, |
|
Back to top |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Fri May 23, 2003 12:46 am Post subject: |
|
|
This is the way this forum is suppose to work. Recently Phantom was asking all kinds of questions, now he is answering some. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri May 23, 2003 2:01 am Post subject: |
|
|
Well, warp thanks for the compliments I was just trying to share the knowledge that I gained from you all. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri May 23, 2003 8:21 am Post subject: |
|
|
And the answer is a good one. You might be able avoid the 2nd exec by using
SELECT PGM(ISPSTRT) PARM(CMD(%ISREPDF dataset-name(member)) )
or a similar incarnation. I was going to test that, but I inadvertently screwed up my allocations on a new system and spent the day chasing down that problem. (Dumb! I concatenated VB and FB data sets in sysproc - Dumb!) So the syntax may not be exactly right (and you may need a NEWAPPL(ISR) or whatever. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri May 23, 2003 9:25 am Post subject: |
|
|
semigeezer,
Thanks for your suggestion. Actually I was a little worried using two different REXX routines and was searching for a solution like this. Well thanks a lot. I will try your suggestion and let you know.
Thanks, |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri May 23, 2003 9:28 am Post subject: |
|
|
semigeezer,
A little more details regarding ISREPDF would be very useful to me.
Thanks, |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri May 23, 2003 9:47 am Post subject: |
|
|
I just browsed few links in groups.google.com,about ISREPDF. They all say that ISREPDF is an ISPF utility to Edit / View / Browse a dataset. But I am a little keen in knowing the difference between ISPEXEC EDIT DATASET and ISREPDF commands. A comparative discussion would be very useful.
Thanks, |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri May 23, 2003 10:21 am Post subject: |
|
|
Sure. ISREPDF is a Rexx exec that takes a data set name as an argument and edits that file. It is, in fact, in the command table as EPDF so that you should be able to go to any command line and type EPDF dataset-name and go into the editor on that data set. ISREPDF also takes parameters similar to the EDIT service such as macro, profile, etc. It also handles edit recovery. It is also good for View and Browse (eg: EPDF dataset-name BROWSE). Type EPDF or TSO ISREPDF on the command line for a small help panel.
Also, ISREPDF should work on VM/CMS though it would need customization. It was originally written for CMS and ported to MVS. ISREPDF has been in the ISPF product since version 3.5 but for a long time existed only in the sample libraries (SISPSAMP). |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Sat May 24, 2003 1:32 am Post subject: |
|
|
Semigeezer,
Doesn't Edit recovery work with ISPEXEC EDIT DATASET command ? In few occasions I realised this. So, I'm thinking of changing my REXX codes to ISREPDF. Any suggestions ???
Few more questions on ISREPDF. Suppose, you are trying to open a copybook from Endevor libraries. What if happen if you give a copybook name that is actually not existing. How do I capture this error. Do you have any links to any books that discuss on ISREPDF, and its return codes ?. Whenever I use the ISPEXEC command and try to Edit / View a non existing member, It actually creates a new member for me. But the same command when used in Browse mode says "MEMBER NOT FOUND". Do we have similar error messages / error handling in ISREPDF ?
Little more details please !!! |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat May 24, 2003 2:20 am Post subject: |
|
|
ISREPDF is really designed to be used from the command line. I doubt that it even has any sane return codes. Edit recovery is something that your program normalyy has to account for via thte EDREC service. ISREPDF calls EDREC as needed. The only doc is the help panel. There may be additional info within the prologue of the exec itself. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Sun May 25, 2003 11:41 pm Post subject: |
|
|
I tried to use ISREPDF service. But the lack of return codes makes it difficult for me to handle it. B'cas In my original REXX programs I have used return codes to figure out the problems like 'MEMBER IN USE', 'MEMBER NOT FOUND' and I would display these messages in a custom panel. This panel will be displayed at different positions on the screen as per my requirement. But when I used ISREPDF service I found that whenever a problem occurs as explained above, it displays the error messages in its own window at the bottom of the screen which I'm unable to handle.
So, I'm thinking of trying the other option. Using EDREC service before invoking ISPEXEC EDIT DATASET command.
Please correct me if I'm wrong.
The sequence should be like this:
Code: |
ISPEXEC EDREC QUERY
IF RC = 4 THEN
DO
ISPEXEC EDREC PROCESS (or)
..............
END
ISPEXEC EDIT DATASET (dataset_name(member))
|
Hope this would give me the flexibility of using return codes and Edit recovery facility also.
suggestions are welcome !!! |
|
Back to top |
|
|
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Tue May 27, 2003 5:10 am Post subject: |
|
|
Phantom,
Thanks for your reply. It helped me.
I have couple of other questions also :
1 > what is the difference between ISPSTRT and ISPSTART ?
2 > Now, in the SELECT statment, I specify a REXX routine in the parm, now when I want to pass some values from the parent(the REXX containing the SELECT) to the child(the routine specified in the parm), I faced the following issues :
1. PUSH and PULL were not working? Why ?
2. So, is the case with VPUT and VGET ? VGET always returned a return code of 8(variable not found). Why ?
I have now solved the parm by passing it as parm. But Im curious enough to know as to what is the problem
Cheers,
Coolman.
________
vapir no2
Last edited by coolman on Sat Feb 05, 2011 1:21 am; edited 2 times in total |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue May 27, 2003 5:49 am Post subject: |
|
|
ISPSTRT & ISPSTART are actually two different commands.
Well, as far as I know, ISPSTART will start a new ISPF Session. So when you are
already under an ISPF session. You cannot start it again. If you would like to try ISPSTART, then in your initial CLIST instead of coding ISPF as a command try giving ISPSTART.
Regarding parameters usage. When you issue an ISPSTRT command the control goes to the new logical screen that it opens. So the line following the ISPSTRT command will not be executed unless you come back to the original screen using SWAP command. Try giving a say command and check. I'm not sure whether this behaviour will affect VPUT & VGET commands in any way.
Probably someone else can help us. I don't have an answer with me for this.
Thanks, |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue May 27, 2003 11:10 am Post subject: |
|
|
Quote: | 1 > what is the difference between ISPSTRT and ISPSTART ? | ISPSTRT is used within ISPF. ISPSTART starts ISPF (with default appl ISP)
Quote: | 2 > Now, in the SELECT statment, I specify a REXX routine in the parm, now when I want to pass some values from the parent(the REXX containing the SELECT) to the child(the routine specified in the parm), I faced the following issues :
1. PUSH and PULL were not working? Why ? | New stacks are created for the new select level. You might be able to do this by using the NOBARRIER keyword (see the SELECT doc) Quote: | 2. So, is the case with VPUT and VGET ? VGET always returned a return code of 8(variable not found). Why ? | Similar thing. You are at a new select level, and possibly within a new application id. Adding NEWAPPL on the SELECT may help there. |
|
Back to top |
|
|
|
|