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

rexx to submit a job and O/P of that job shd display on scre


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

New User


Joined: 14 Sep 2007
Posts: 30
Location: Bangalore

PostPosted: Fri Sep 05, 2008 2:46 pm
Reply with quote

Hi,

I am not sure what the tittle of this mail should be but my requirement is as follows.

I want to execute a REXX routine.

Rexx should internally submit a batch job.
The batch job creates and output file
The contents of the output file should be displayed as final output on mainframe screen.

Is this possible. If yes, how.
Regards,
Neelima Sinha
Back to top
View user's profile Send private message
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 30
Location: Bangalore

PostPosted: Fri Sep 05, 2008 2:51 pm
Reply with quote

My JCL is something like this and I want to display the output of file SDSF.FORMATA on screen ....

//*--------------------------------------------------------------------
// JCLLIB ORDER=(JJL.SUPPORT.CNTL)
//SDSF1 EXEC PGM=ISFAFD
//ISFOUT DD DISP=OLD,DSN=SDSF.OUTPUT
//ISFIN DD *
RES
SORT RESOURCE A

//SORT EXEC PGM=SORT,COND=(0,LT)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=SDSF.OUTPUT,DISP=SHR
//SORTOUT DD DSN=SDSF.FORMATA,DISP=SHR
//SYSIN DD *
SORT FIELDS=(08,16,CH,A)
SUM FIELDS=NONE
INCLUDE COND=(08,16,CH,EQ,C'SCHR_CR_STREAM_A',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_B',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_C',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_D',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_E',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_F',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_G',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_H',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_I',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_J',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_P',OR,
08,16,CH,EQ,C'SCHR_CR_STREAM_R')
OUTREC IFTHEN=(WHEN=(34,2,CH,EQ,C'ON'),
OVERLAY=(1:23,1,2:13X,15:C'MVSI',80X)),
IFTHEN=(WHEN=(52,2,CH,EQ,C'ON'),
OVERLAY=(1:23,1,2:13X,15:C'MVSL',80X)),
IFTHEN=(WHEN=(61,2,CH,EQ,C'ON'),
OVERLAY=(1:23,1,2:13X,15:C'MVSM',80X)),
IFTHEN=(WHEN=(70,2,CH,EQ,C'ON'),
OVERLAY=(1:23,1,2:13X,15:C'MVSP',80X)),
IFTHEN=(WHEN=NONE,OVERLAY=(15:C'NOT ACTIVE',80X))
/*
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Sep 05, 2008 2:57 pm
Reply with quote

No, not possible, the submitted batch job and your TSO session are completely different address spaces (tasks).

This has been discussed before with the suggestion that the TSO session wait for the batch job to end and then display the output, but this was deemed a bad idea by almost everybody that commented. Well, except for the OP icon_rolleyes.gif
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Sep 05, 2008 3:14 pm
Reply with quote

Well, not need to submit a job, from Rexx you could invoke SDSF and SORT in foreground.

Feasible, but not Advisable
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Sep 05, 2008 10:56 pm
Reply with quote

Quote:
Feasible, but not Advisable


For large amounts of data, I agree.

For SDSF RES display, I think there is not enough data to worry. You should be able to call SDSF from your rexx program, then call SORT from your rexx program. (no batch job needed).
Back to top
View user's profile Send private message
Adrian Stern

New User


Joined: 13 Feb 2008
Posts: 12
Location: Sweden

PostPosted: Mon Sep 08, 2008 4:40 pm
Reply with quote

I've done this in the past and it's certainly no big deal as long as you use a true wait routine (from uss). You can trap the response to the submit command, extract the jobid and then read it from the output queue.

But why would you want to?

There is a web version of sdsf too so your users don't even have to enter tso.

Adrian
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

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
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
Search our Forums:

Back to Top