Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Rexx to execute spool commands
Goto page 1, 2, 3  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Fri Sep 29, 2017 1:08 pm    Post subject: Rexx to execute spool commands
Reply with quote

I have the below query,

I have run the below job to execute spool commands through batch and coded a Rexx routine to execute the below commands.

Code:
//USER01TS JOB (),'EXAMPLE',NOTIFY=&SYSUID,CLASS=A,MSGLEVEL=(1,1),
// MSGCLASS=X
//SDSF EXEC PGM=SDSF
//ISFOUT DD SYSOUT=*
//CMDOUT DD DSN=USER01.COMMAND.OUTPUT,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0),
// SPACE=(CYL,(1,1)),UNIT=SYSDA
//ISFIN DD *
SET CONSOLE BATCH
SET DELAY 600
/D A,L
/$ D SPOOL
PRINT FILE CMDOUT
ULOG
PRINT
PRINT CLOSE
/*
//


In Both cases (Batch JCL and Rexx) Am getting command outputs to CMDOUT Dataset but am able to see same output in SPOOL as well.

My requirement is I want command outputs to CMDOUT dataset and I dont want them in SPOOL , Because I have requirement to execute Multiple spool commands(More than 1000)
Is there any way to avoid output of spool commands in Spool and re-direct them to dataset?

Thanks!
Upendra

Coded
Please do it yourself next time
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1932
Location: UK

PostPosted: Fri Sep 29, 2017 2:09 pm    Post subject:
Reply with quote

What have you tried? There seems to be one JCL statement that could be altered to attempt what you want.
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Fri Sep 29, 2017 5:17 pm    Post subject:
Reply with quote

Hi Nic,

Thank you for your response. I have coded the below Rexx

"ALLOC DD(ISFOUT) DA('TEST1.SPOOL.OUT1') SHR REUSE"
"ALLOC DD(CMDOUT) DA('TEST2.JES.OUTPUT') MOD REUSE"
"ALLOC DD (ISFIN) NEW REU"
QUEUE " SET CONSOLE BATCH "
QUEUE " SET DELAY 600 "
QUEUE " /£DJQ '"J"',SPL "
QUEUE " PRINT FILE CMDOUT "
QUEUE " ULOG "
QUEUE " PRINT "
QUEUE " PRINT CLOSE "
"EXECIO "QUEUED()" DISKW ISFIN (FINIS"
"CALL *(SDSF)"
END

TEST1.SPOOL.OUT1 - This file contains Job names ( Which are in spool )

After reading this file am submitting the above Jes command to know the spool percentage occupied by those Jobs.

Am getting expected output in CMDOUT dataset but am able to see all those commands which executed during this process in Spool. Commands are more than 1000.

So I need to execute those commands and I want their ourput in my dataset but I dont want to see them in Spool.

Thanks!
Upen.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Fri Sep 29, 2017 5:40 pm    Post subject: Reply to: Rexx to execute spool commands
Reply with quote

Quote:
So I need to execute those commands and I want their ourput in my dataset but I dont want to see them in Spool.


if You do not want to see them, do not look at them icon_cool.gif

why does it bother You, as long as You get the output also in Your dataset ?
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Fri Sep 29, 2017 5:49 pm    Post subject:
Reply with quote

Hi Enrico,

Yeah.. you are true. But these commands occupying spool and we have people to Monitor spool .

Thanks!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1932
Location: UK

PostPosted: Fri Sep 29, 2017 7:08 pm    Post subject:
Reply with quote

You still have not addressed the hint that I gave you about a possible change in your JCL - one of the DDNAMEs is allocated to spool. What happens when it is dummied or pointed elsewhare?
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Fri Sep 29, 2017 7:44 pm    Post subject:
Reply with quote

Hi Nic,

I have tried both as below

1.
//SDSF EXEC PGM=SDSF
//ISFOUT DD DUMMY
//CMDOUT DD DSN=TEST.COMMAND.OUTPUT,DISP=SHR
//ISFIN DD *
SET CONSOLE BATCH
SET DELAY 600
/DJQ TEST0001,SPL
PRINT FILE CMDOUT
ULOG
PRINT
PRINT CLOSE
/*
//

2.
//SDSF EXEC PGM=SDSF
//ISFOUT DD DSN=TEST.COMMAND.OUTPUT,DISP=SHR
//CMDOUT DD DSN=TES1.COMMAND.OUTPUT,DISP=SHR
//ISFIN DD *
SET CONSOLE BATCH
SET DELAY 600
/D SMS
PRINT FILE CMDOUT
ULOG
PRINT
PRINT CLOSE
/*
//

In both cases am able to see the below output in spool

D SMS
IGD002I 15:11:00 DISPLAY SMS 461
SCDS = LSWN.N1SMS.SCDS
ACDS = LSWN.N1SMS.ACDS
COMMDS = LSWN.S1SMS.COMMDS
ACDS LEVEL = z/OS V2.2
DINTERVAL = 150
REVERIFY = NO
ACSDEFAULTS = NO
SYSTEM CONFIGURATION LEVEL INTERVAL SECONDS
PLEXS1 2017/09/29 15:10:53 15
IEA631I OPERATOR BATCH NOW INACTIVE, SYSTEM=BSOS , LU=BATCH

Thanks!
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sat Sep 30, 2017 5:40 am    Post subject: Reply to: Rexx to execute spool commands
Reply with quote

You might also try a job message class where the output is deleted after the job runs.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 587
Location: The Universe

PostPosted: Sat Sep 30, 2017 6:29 am    Post subject:
Reply with quote

The $DQ command does not display the SPOOL utilization of a single job. It displays the current SPOOL utilization of the system. I think you better crack open the z/OS JES2 Commands manual for your z/OS release.

Rather than use operator commands you'd be better off looking at the TGPct column in the SDSF job status output.
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Sat Sep 30, 2017 6:57 am    Post subject:
Reply with quote

Hi Pedro,

Thank you. But what I need is through this Job am going to execute multiple commands (More than 1000) , Even If I delete the Job from spool , The commands processed by this job will there in spool. So I want to avoid them.

My requirement is : My Commands should be executed in background and those commands and outputs should not showed in spool.

Thanks!
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Sat Sep 30, 2017 7:08 am    Post subject:
Reply with quote

Hi Steve,

Am issuing the below Jes command to know the Spool percentage occupied by a job in spool

/$DJQ 'JOBNAME',SPL

Here is an example.

/$DJQ 'TESTNEW1',SPL
£HASP890 JOB(TESTNEW1)
£HASP890 JOB(TESTNEW1) SPOOL=(VOLUMES=(IN1103,04,01,02),TGS=8,
£HASP890 PERCENT=0.0039)

In case if we get similar Result using TGPct column , Can you please assist me how to check Spool percentage used by single job using TGPct column?



Thanks!
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 186
Location: Switzerland

PostPosted: Sat Sep 30, 2017 1:48 pm    Post subject:
Reply with quote

I don't think that you can avoid that command output is copied to spool when using SDSF batch.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 186
Location: Switzerland

PostPosted: Sat Sep 30, 2017 1:50 pm    Post subject:
Reply with quote

I strongly suggest that you look at the SDSF REXX API. With that you can avoid some of the displays.
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Sat Sep 30, 2017 2:28 pm    Post subject:
Reply with quote

Hi Willy Jensen,

Okay. Is there anyway to know the spool percentage used by a single Job other than issuing Jes command?



Thanks!
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 186
Location: Switzerland

PostPosted: Sat Sep 30, 2017 3:22 pm    Post subject:
Reply with quote

Certainly. The STATUS display gives you the TGPCT amongst other info. Look in SDSF, if the information is shown on a screen, you can most likely get the same info from the REXX API. I know that TGPCT is available.
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Sat Sep 30, 2017 3:46 pm    Post subject:
Reply with quote

Hi Willy Jensen,

Actually I have compare both Jes spool command TGPCT as below

TKSR 00000290 $DJQ 'TTSYTKSR',SPL
JOB63125 00000090 $HASP890 JOB(TTSYTKSR) 685
685 00000090 $HASP890 JOB(TTSYTKSR) SPOOL=(VOLUMES=(SPS101),TGS=1,
685 00000090 $HASP890 PERCENT=0.0019)


NP JOBNAME PrtDest SecLabel TGNum TGPct OrigNode ExecNode Devic
TTSYTKSR LOCAL 1 0.00 LOCAL LOCAL


For the Job TTSYTKSR From the Jes spool command spool percentage is : 0.0019

But for the same Job TGPCT showed as 0.00.

Not sure how to relate them. Tried reading manual but TGPCT information is not understandable to me.

Can you give me an example?

Thanks!
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Sat Sep 30, 2017 3:52 pm    Post subject:
Reply with quote

upendrasri wrote:

For the Job TTSYTKSR From the Jes spool command spool percentage is : 0.0019

But for the same Job TGPCT showed as 0.00.

Not sure how to relate them.

Sheesh, ever heard about rounding?
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Sat Sep 30, 2017 3:57 pm    Post subject:
Reply with quote

Hi Prino,

Oh yeah got it but I want to know the actual spool percentage occupied by that particular Job?

Is there anyway to get the actual value rather than Rounding of TGPCT?

Thanks!
Back to top
View user's profile Send private message
upendrasri

New User


Joined: 28 Sep 2017
Posts: 49
Location: India

PostPosted: Sat Sep 30, 2017 4:09 pm    Post subject:
Reply with quote

Hi Prino,

If am not wrong, TGPCT is showing only two digits after dot(.)

From my above example Spool percentage from Jes command is : 0.0019

TGPCT Value is : 0.00

Seems it is not considering 3rd and 4th digits. I have tried with another example.

JOB63237 00000090 $HASP890 JOB(TTSYTKSR) 689
689 00000090 $HASP890 JOB(TTSYTKSR) SPOOL=(VOLUMES=(SPS101),TGS=15,
689 00000090 $HASP890 PERCENT=0.0299)

TGPCT Value is : 0.02

Correct me in case if my understanding is wrong.

Thanks!
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Sat Sep 30, 2017 4:29 pm    Post subject:
Reply with quote

So it doesn't round, but it truncates, big deal...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to send mail with SMTP commands harsh.saxena579 JCL & VSAM 10 Tue Dec 12, 2017 1:58 pm
No new posts Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
This topic is locked: you cannot edit posts or make replies. Rexx to Grab ISMF Information. upendrasri All Other Mainframe Topics 16 Sun Nov 26, 2017 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us