View previous topic :: View next topic
|
Author |
Message |
Reema Naik
New User
Joined: 24 Apr 2008 Posts: 5 Location: india
|
|
|
|
Hi,
I am facing a difficulty. We have to create a program wherein, when we type a specific name at command line in a cobol program n press enter by placing cursor on the program name following the call keyword, such that the called program automatically pops out and can be viewed directly.
The concept to be used is the same that we use VC command on the command line in cobol program to directly view the copybooks when cursor is placed on the Copybook name following the Copy keyword. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
confusing...
do You want to browse the load module or the source
or You are browsing the load and you want to nest the browsing of another load ???
if the load has static calls the called program will be somewhere in the load module
check the VCURSOR tool at
http://www.sillysot.com/mvs/ |
|
Back to top |
|
|
Reema Naik
New User
Joined: 24 Apr 2008 Posts: 5 Location: india
|
|
|
|
Thanks for replying
I want to browse a source program and not load programs.
I'll explain the concept with the help of an example.
In a cobol program
Prog1 // Prog1 is the main program
{
.
.
.
CALL Prog2 // Prog1 calling Prog2
.
.
.
}
Here Prog1 is calling Prog2. Prog2 may reside in the same data set or in some other data set. I need to write code (and give a name to this code, for eg: xyz) ,where, when we type the name xyz on the command line of the cobol program we retrieve the Called program Prog2.
This concept is similar to the one we use in cobol programming, when we type VC at the command line.
This too I'll explain with the help of an example..
eg:
Command ==> __VC_______________
COPY "ABC" // ABC is the name of a copybook
When we place the cursor on the name of the copy book ABC by typing VC at command line, ABC automatically opens up and we can view the contents of ABC without actually pressing the F3/F9 key to go back to that particular data set and view its contents explicitly.
Using this VC command the overhead of browsing the screens using F3/F9 is reduced.
Same way, i need to write a Rexx code which will help a cobol program to directly open another program (source) without using the F3/F9 key.
Command ==> ___xyz______________
CALL Prog2
By typing xyz, on command line n positioning the cursor on Prog2 and pressing enter, this Rexx code should open Prog2.
Also, i want to know how to detect the cursor placed at a particular position.
Ream.. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
The process for this as you said is very similar to your VC command. Find the code for that and copy it. I do not have VC, but I have other commands that work in a similar manner.
Get the cursor position then get that line.
ADDRESS "ISREDIT" "(ROW,COL) = CURSOR"
ADDRESS "ISREDIT" "(DATALN) = LINE (ROW)"
Find the program name on that line
Find the PDS containing that program (if you store your source in a PDSs)
then browse it.
ADDRESS "ISPEXEC" "BROWSE DATASET('" || DSN || "')" |
|
Back to top |
|
|
Reema Naik
New User
Joined: 24 Apr 2008 Posts: 5 Location: india
|
|
|
|
Hi Douglas,
Thanks for replying.
Can you please provide me the Code for the VC command we use for viewing the contents directly from the copybook??? I tried searching it everwhere but couldn't find it.
--------------------------
Reema |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
This code would be exactly the same, as Douglas told you.
Search your allocated ISPF-Libs for the VC-Member.
Get the names of these libs by using TSO LISTA STATUS
Search in Clist/Rexx Libraries allocated under SYSPROC.
Regards, UmeySan |
|
Back to top |
|
|
|