Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
rexx to submit a job and O/P of that job shd display on scre

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 24
Location: Bangalore

PostPosted: Fri Sep 05, 2008 2:46 pm    Post subject: rexx to submit a job and O/P of that job shd display on scre
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
References
neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 24
Location: Bangalore

PostPosted: Fri Sep 05, 2008 2:51 pm    Post subject:
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: 3544
Location: Brussels once more ...

PostPosted: Fri Sep 05, 2008 2:57 pm    Post subject:
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

Senior Member


Joined: 11 May 2005
Posts: 315
Location: Spain

PostPosted: Fri Sep 05, 2008 3:14 pm    Post subject:
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

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

PostPosted: Fri Sep 05, 2008 10:56 pm    Post subject: Reply to: rexx to submit a job and O/P of that job shd displ
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: 7
Location: Sweden

PostPosted: Mon Sep 08, 2008 4:40 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1