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

Can we run REXX exec in spool


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krsk

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Fri Jul 11, 2008 5:13 pm
Reply with quote

Hello

Can we run REXX exec in spool? Suppose I have one exec DE for deleting a dataset, I have to use it for deleting the datasets in one of the jobs in the spool.

Thanking you
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 11, 2008 5:20 pm
Reply with quote

How do you mean run it in the spool ?

Do you perhaps mean to process JES elements ?
Back to top
View user's profile Send private message
krsk

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Fri Jul 11, 2008 6:39 pm
Reply with quote

Hello

It is like this, see if we have some job submitted like USERIDA, when we go into that, using ? in the left of jobname in the spool, then it displays some datasets, if we press s we can browse them. In the same way, I want a REXX program DE if I type DE instead of S, it should be deleted. Is it possible with REXX and ISPF in the spool?

I am new to REXX, so I do not have much idea on REXX.

Thanking you,
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Jul 11, 2008 6:48 pm
Reply with quote

Quote:
using ? in the left of jobname in the spool, then it displays some datasets, if we press s we can browse them. In the same way, I want a REXX program DE if I type DE instead of S, it should be deleted


You want a function to delete selected spool files while is SDSF? If you display the job as (H)eld output and enter the ? You can then purge individual files.

Regards,
Garry.
Back to top
View user's profile Send private message
krsk

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Fri Jul 11, 2008 7:02 pm
Reply with quote

Hello,

Yeah, but I want to develop my own REXX routine, I want to do some other programs also for renaming the files in spool etc.

Thanking you,
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Jul 11, 2008 7:13 pm
Reply with quote

The names you see when you do a '?' by a job are the DDNAMEs that created the spool output. You cannot change these names.

If you select output for viewing using the 'SE' command, you'll be in an EDIT window. You could use EDIT macros written in REXX to act upon dataset names found in the output.
Back to top
View user's profile Send private message
krsk

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Mon Jul 14, 2008 11:34 am
Reply with quote

Hello,

Yeah! That is right. Renaming the files in the SPOOL is not possible.

I gave that by mistake, I wanted to mean an example.

The requirement is, I want to create my own REXX routines, for editing, browsing, deleting etc the files in SPOOL job, and I want to know how I can run it in SPOOL.

Thanking you,
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Jul 14, 2008 1:19 pm
Reply with quote

Quote:
I want to create my own REXX routines, for editing, browsing, deleting etc the files in SPOOL job


It's unclear what precisely you want to do. Do you want the ability to manipulate the contents of SPOOL datasets (e.g. JESYSMSG, SYSPRINT &c.) or do you want to manipulate selected datasets that were used by the job during execution?

If the former, I'd expect that your security people would have a view on this as you would be attempting to alter the jobs' history. If the latter, you can use IBM's SDSF Support for REXX or else interface with the SDSF program by providing the ISFIN and ISFOUT and linking to SDSF.


Quote:
I want to know how I can run it in SPOOL.


You can't run in IN spool. Spool is data, not an environment. You can run your REXX to use the spool data.


Regards,
Garry.
Back to top
View user's profile Send private message
krsk

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Mon Jul 14, 2008 7:41 pm
Reply with quote

Hello,

The actual requirement is, I want to develop a REXX routine DS – Delete dataset, place the cursor on the dataset of the Job and the dataset should get deleted. Like this I want some more routines like, ED - edit dataset, BD - Browse dataset, LM - list the members in the PDS in the JOB, etc.

Thanking you,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Jul 14, 2008 7:55 pm
Reply with quote

Quote:
I am new to REXX, so I do not have much idea on REXX.

developing tools is not something easy if You do not have an idea of ...
also the whole set of questions did not clarify at all Your needs,
maybe they were clear to You but You were not able to extend this clarity around ...

Quote:
The actual requirement is, I want to develop a REXX routine DS

is that a requirement or a whim..... looks more like the second icon_confused.gif

also the issue is not at all spool, or anything similar related

is just a simple cursor driven data extraction from any ispf like panel
position the cursor on something that looks like a dataset name and,
hitting the proper function key perform some action

the issue has been debated with dubious results many many times
as a hint search the net for the vcursor snippet from Doug Nadel
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 14, 2008 10:04 pm
Reply with quote

Hello,

Quote:
Like this I want some more routines like, ED - edit dataset, BD - Browse dataset, LM - list the members in the PDS in the JOB, etc.
Keep in mind that the spool is not at all like a pds and cannot be accessed the same ways.

Quote:
The actual requirement is, I want to develop a REXX routine DS
Who determined this requirement (and the others you mentioned)? What business reason is there for this?

Spool entries should be looked at, possibly printed, and deleted - there should be no editing of spool entries. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jul 15, 2008 12:02 pm
Reply with quote

dick scherrer wrote:
Spool entries should be looked at, possibly printed, and deleted - there should be no editing of spool entries. . .
Yup they are to check the status of some "run"..otherwise why IBM licensed program has been given a name "System Display And Search Facility", they could have done with it by something like SDEF - "System Data And Edit Facility" .. icon_biggrin.gif


P.S.: Sorry, I know my reply in this thread is just 'stupid' but it's one of the most ambitious (weird actually) requirement I've ever come across..or perhaps the explanation from the OP is not that well constructed..
Back to top
View user's profile Send private message
krsk

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Wed Jul 16, 2008 10:54 am
Reply with quote

Hello,

Sorry for being not able to describe the problem in the way everyone can understand......

Let me explain the problem once again.

See I have a REXX routine ED, for editing the dataset. What it does is, when I open some datasets like JCLs, which contain the names of other datasets in them, when I type ED in command line and place the cursor on the dataset name, that dataset gets opened in edit mode.

Now, I want a REXX routine, with which I can edit the datasets which are referred in the SPOOL outputs like JESJCL. How can it be done?

Thanking you,
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Jul 16, 2008 12:28 pm
Reply with quote

Hi,

Bill mentioned it earlier, rather than selecting the job with an S, select it with SE, this will put you in EDIT mode and you should be able to use your MACROes.


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 16, 2008 8:52 pm
Reply with quote

Hello,

Quote:
Now, I want a REXX routine, with which I can edit the datasets which are referred in the SPOOL outputs like JESJCL. How can it be done?
I believe we understand what you want. . . I also believe you cannot get what you say you want. . . .

Editing implies change. Data already spooled will not be changed by an editing session. Even if you enter the editor, i believe the closest you could get to what you seem to want is to save a copy in some dataset.

As i asked earlier and you have not yet answered - what business reason is there to do this? If we understood why this is needed, we might be able to offer better suggestions.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Wed Jul 16, 2008 10:38 pm
Reply with quote

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

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Thu Jul 17, 2008 3:35 pm
Reply with quote

Hello

Pedro's reply exactly points to the answer of the problem. icon_smile.gif

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

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Thu Jul 17, 2008 3:43 pm
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 17, 2008 7:23 pm
Reply with quote

Hello,

Quote:
I believe we understand what you want. . .
I surely missed this one. . . icon_sad.gif

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 icon_redface.gif

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

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Thu Jul 17, 2008 9:26 pm
Reply with quote

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

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Fri Jul 18, 2008 2:52 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jul 18, 2008 3:05 pm
Reply with quote

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

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Jul 18, 2008 9:35 pm
Reply with quote

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

New User


Joined: 08 Oct 2007
Posts: 36
Location: Columbia, SC

PostPosted: Fri Jul 18, 2008 9:53 pm
Reply with quote

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

New User


Joined: 24 Jun 2008
Posts: 23
Location: INDIA

PostPosted: Wed Jul 23, 2008 5:00 pm
Reply with quote

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
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 -> CLIST & REXX Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top