Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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    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

neelima.sinha

New User


Joined: 14 Sep 2007
Posts: 30
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: 8593
Location: Back in jolly old England

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

Active User


Joined: 11 May 2005
Posts: 344
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: 2033
Location: Silicon Valley

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: 12
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us