IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Open a program when cursor is positiond on call


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Reema Naik

New User


Joined: 24 Apr 2008
Posts: 5
Location: india

PostPosted: Tue Apr 29, 2008 12:54 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Apr 29, 2008 3:19 pm
Reply with quote

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
View user's profile Send private message
Reema Naik

New User


Joined: 24 Apr 2008
Posts: 5
Location: india

PostPosted: Tue Apr 29, 2008 6:14 pm
Reply with quote

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
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue Apr 29, 2008 8:02 pm
Reply with quote

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
View user's profile Send private message
Reema Naik

New User


Joined: 24 Apr 2008
Posts: 5
Location: india

PostPosted: Wed Apr 30, 2008 12:55 pm
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Apr 30, 2008 3:28 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top