|
|
| Author |
Message |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 313 Location: work
|
|
|
|
| Quote: |
| edit the datasets which are referred in the job |
FYI. not the original quote, but what I gleaned from the posts.
coding:
1. write ISPF editor macro that uses CURSOR macro command to determine which line and which column the cursor is on.
2. Use LINE macro command to get the line.
3. use REXX parse instruction to isolate data at cursor location.
4. invoke EDIT service specifying dataset name.
5. put your code into SYSPROC concatenation.
setup:
1. enter SE line command in front of job to enter an editor session for the job output.
2. issue KEYS command.
3. set a PF key to issue your new program
4. PF3 to exit KEYS panel
usage:
1. enter SE line command in front of job to enter an editor session for the job output.
2. put cursor on dataset name
3. press your changed PF key. |
|
| Back to top |
|
 |
References
|
Posted: Wed Jul 16, 2008 10:38 pm Post subject: Re: Reply to: Can we run REXX exec in spool |
 |
|
|
 |
krsk
New User
Joined: 24 Jun 2008 Posts: 16 Location: INDIA
|
|
|
|
Hello
Pedro's reply exactly points to the answer of the problem.
But, I would like to know where to issue the keys command? It does not work in the command input line in the screen which we get by issuing se infront of the job.
Thanking you,
[/quote] |
|
| Back to top |
|
 |
krsk
New User
Joined: 24 Jun 2008 Posts: 16 Location: INDIA
|
|
|
|
Hello,
| Quote: |
what business reason is there to do this?
Suppose we submit a jcl, in which we have many dsns. If any error occurs while submitting that jcl, we can go to spool and understand the reasons. The the jcl used is in JESJCL. Now, suppose editing, or browsing one of the datasets refferred by the jcl becomes necessary, then if we have some routines we can just place the cursor over dsn and run the routine, we can edit it, there itself.
I can site you one example. In this case I have written a COBOL program for writing data into a sequential file, the data is also given through the JCL. I submit the run jcl, the job is executed successfully. Now I want to see the file that is written. Now, suppose I am in the SPOOL, JESJCL, there I want to see the file. If I have one routine BD I can just place the cursor on the dsn and run the routine, the dataset gets opened there itself.
Thanking you, |
|
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7505 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| I believe we understand what you want. . . |
I surely missed this one. . .
| Quote: |
| Now, suppose editing, or browsing one of the datasets refferred by the jcl becomes necessary, |
Now, i believe i understand. . . Until now, i misunderstood that you wanted to actually edit the spool content rather than some dataset named in the spool content
Editing some dataset should not be an issue. . .
And, yes, i believe you would do well to proceed as Pedro suggested. You could issue the KEYS command on the ispf main menu and the "Keylist Utility" will be run and you can customize your pfk definitions. |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 313 Location: work
|
|
|
|
| Quote: |
| You could issue the KEYS command on the ispf main menu and the "Keylist Utility" will be run and you can customize your pfk definitions. |
I think you get the wrong set of keys, doing it from the ISPF main menu.
In SDSF, after you type SE and press Enter, it should put you into the editor with your job output shown. In the ISPF command line, type KEYS. If that does not work, please explain what message you get.
You can also be anywhere within SDSF and type KEYLIST in the command line. Select ISFEDKEY to get the keys used by the SE edit session. |
|
| Back to top |
|
 |
krsk
New User
Joined: 24 Jun 2008 Posts: 16 Location: INDIA
|
|
|
|
Hello,
| Quote: |
In SDSF, after you type SE and press Enter, it should put you into the editor with your job output shown. In the ISPF command line, type KEYS. If that does not work, please explain what message you get.
|
I went to SDSF, by using TSO SDSSF ST, I typed SE infront of the job and then, in the command line I typed KEYS. It is showing invalid command.
Thanking you, |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2560 Location: italy
|
|
|
|
| Quote: |
| I went to SDSF, by using TSO SDSSF ST, I typed SE infront of the job and then, in the command line I typed KEYS. It is showing invalid command. |
you did not enter the ispf sdsf application
You used the sdsf tso command with its builtin display logic
You should have noticed that by entering se, You did not get an edit session
but a browse session of the jes dataset ( tested )
if You enter the sdsf application thru the ISPF interface all the ISPF facilities will be available ( tested ) |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 313 Location: work
|
|
|
|
Their is usually a local menu panel that is used to call SDSF.
Or you could use an (untested) exec like this:
| Code: |
/* rexx */ Parse arg option
Address ISPEXEC "SELECT PGM(ISFISP) NEWAPPL(ISF) PARM("option")" |
|
|
| Back to top |
|
 |
Josh Keller
New User
Joined: 08 Oct 2007 Posts: 7 Location: Columbia, SC
|
|
|
|
| Pedro wrote: |
coding:
1. write ISPF editor macro that uses CURSOR macro command to determine which line and which column the cursor is on.
2. Use LINE macro command to get the line.
|
Just as an FYI (and some probably already know), you can use ZSCREENI variable to obtain text from the screen rather than limiting to just an Edit Macro LINE command.
| Code: |
"ISPEXEC VGET (ZSCREENI,ZSCREENC,ZSCREENW)"
ZSCREENC = ZSCREENC + 1
ROW=(ZSCREENC)%ZSCREENW
COL=ZSCREENC - (ZSCREENW*ROW)
ROW = ROW + 0
IF COL <= 0 THEN ROW = ROW -1
LINETEXT=SUBSTR(ZSCREENI,((ROW*ZSCREENW)+1),ZSCREENW)
|
Then you can parse LINETEXT to pull out the DSN and use Pedro's instructions to set it up. This would allow you to pull the DSN out while viewing JESJCL for example, and you don't need an edit session. |
|
| Back to top |
|
 |
krsk
New User
Joined: 24 Jun 2008 Posts: 16 Location: INDIA
|
|
|
|
Hello,
Yeah! I got the answer to the problem. Like Pedo said, in SDSF(entered through the menu option), we can use the same rexx routine for editing the datasets.
Thanking you, |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7505 Location: 221 B Baker St
|
|
|
|
Hello KRSK,
Thank you for letting us know you have a solution
d |
|
| Back to top |
|
 |
|
|