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

How to clear a queue in rexx


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

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Mon Nov 15, 2010 10:29 pm
Reply with quote

Hi Folks,

My rexx is as below,

QUEUE "//LTDEV00W JOB (?????,?????),'test',MSGCLASS=N,NOTIFY=&SYSUID"
QUEUE "//*MAIN CLASS=RSPDEVC"
QUEUE "//STEP2 EXEC PGM=IEBGENER"
QUEUE "//SYSUT1 DD DSN="PRODFILE"(0),DISP=SHR"
QUEUE "//SYSUT2 DD DSN="DEVFILE"(+1),"
QUEUE "// DISP=(NEW,CATLG,DELETE),"
QUEUE "// LIKE="LASTDSN2
QUEUE "//SYSIN DD DUMMY"
QUEUE "//SYSPRINT DD SYSOUT=*"
QUEUE "/*"
QUEUE "$$"

My requirement is to clear these statements once these statements have been executed.
Note: This is not a named queue.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Nov 15, 2010 11:02 pm
Reply with quote

DROPBUF
Back to top
View user's profile Send private message
karthickpearl

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Tue Nov 16, 2010 11:45 am
Reply with quote

Hi

Dropbuf would not work obviously.. Since this is the generic queue.. I mean this is not created with "makebuf" command.

I actually want to run these queued statements in a loop and submit the jobs one by one.. When I try to do that with out clearing the queue the job statements were not in order.

Please help me out on this issue.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 16, 2010 12:35 pm
Reply with quote

Perhaps if you bothered to tell us the WHOLE requirement rather that that which you feel we should know, then YOU would not waste the time of others who have misinterpretted your requirement solely due to YOUR lack of information.

So, let's start again shall we, exactly what is it that you want to achieve.

I somehow suspect that using ISPF skeletons would be a whole sight easier than this stupid direction of building and queueing JCL multiple times.

But, hey, you might have shares in the hardware suppliers company.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 16, 2010 12:39 pm
Reply with quote

if the script has been properly designed the queue content should be properly taken care of automagically!

what should happen after You QUEUE the <things> ???
unless the requirement is just to burn up cpu cycles
like the manager's habit of making photocopies and shredding the original afterwards
Back to top
View user's profile Send private message
karthickpearl

New User


Joined: 13 Apr 2010
Posts: 35
Location: Chennai

PostPosted: Tue Nov 16, 2010 12:42 pm
Reply with quote

Hi expat,

My requirement is as below. Just to create dynamic JCL through a rexx code and submit it repestedly by changeing few values in the JCL statements.

Code:

PRODFILE = "ln.xyz"
DEVFILE = "LT.XYZ"
LASTDSN2 = "LN.xyz.G001V00"
 "MAKEBUF"                                               
QUEUE "//LTDEV77W JOB (52000,00000),'LTDEV08',MSGCLASS=N,"
QUEUE "// NOTIFY=&SYSUID"                                 
QUEUE "//*MAIN CLASS=RSPDEVC"                             
QUEUE "//STEP2    EXEC PGM=IEBGENER"                     
QUEUE "//SYSUT1   DD   DSN="PRODFILE"(0),DISP=SHR"       
QUEUE "//SYSUT2   DD   DSN="DEVFILE"(+1),"               
QUEUE "//           DISP=(NEW,CATLG,DELETE),"             
QUEUE "//           LIKE="LASTDSN2                       
QUEUE "//SYSIN    DD   DUMMY"                             
QUEUE "//SYSPRINT DD   SYSOUT=*"                         
QUEUE "/*"                                               
QUEUE  "$$"                                               
ADDRESS TSO "SUB * END($$)"                               
"DROPBUF"                                                 

These statements will run in a loop with dynamic values for the variables.
As peterHolland suggested, I tried Makebuf and Dropbuf and it worked perfectly well.

Thank u all for your replies..
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 16, 2010 1:42 pm
Reply with quote

karthickpearl wrote:
Dropbuf would not work obviously.. Since this is the generic queue.. I mean this is not created with "makebuf" command.
Well, having corrected this error in the past, the DROPBUF command works just dandy. All you needed to do was to read the manual to find out how to do it.

Can I ask why oh so many people want to build the JCL stream in the REXX code many times rather than just do it once into an ISPF skeleton and then include the ISPF skeleton when required.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 16, 2010 1:46 pm
Reply with quote

If one is payed for the number of lines of code, the choice is easy. icon_eek.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 16, 2010 1:51 pm
Reply with quote

Peter, ever the cynic icon_lol.gif

I had to sort out an error in REXX generated JCL, and found out that the idiots had cloned the same JCL in 19 different REXX execs, and so I would have had to make 19 changes.

That was swiftly converted to 1 skeleton, and errrrrr documented too.

Still had to do 19 changes, but only once.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 16, 2010 1:58 pm
Reply with quote

Of course expat, there is nothing more beautifull than making life easy.
And after that and everything is running smoothly to lean back happily and look around for all those gorgeous IT ladies to learn them a few tricks. icon_mad.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 16, 2010 2:05 pm
Reply with quote

Peter, IT ladies, I started in IT in the 70's and going round to the punch room was full of expectations.

Reminisent Sighhhhhhhhhhhhhhhhhh, oh those were the days, 30+ young ladies in one room, the era of the micro mini skirt. I just didn't know where to look icon_lol.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 16, 2010 2:09 pm
Reply with quote

just tested, no need after the submit to clear the queue
a queue is processed ONCE

try duplicating the SUB command and You will get some SUBMIT messages
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


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

PostPosted: Tue Nov 16, 2010 2:36 pm
Reply with quote

References to IT ladies......

I realise that this is a mainframe forum... but is this wandering toward being non-PC ??

Garry.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Nov 16, 2010 4:02 pm
Reply with quote

As a general practice, I have a "finalize" routine in my REXXs with something like this:
Code:
DO I = 1 TO QUEUED()
  PULL DUMMY
END I


O.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Nov 16, 2010 4:05 pm
Reply with quote

ofer, know what you mean
Code:
DROPBUF 0
works for me, deals with anything pushed or queued.
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: Tue Nov 16, 2010 9:16 pm
Reply with quote

Hi Garry,

Quote:
I realise that this is a mainframe forum... but is this wandering toward being non-PC ??
Isn't a mainframe by definition non-PC . . . icon_cool.gif

d
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


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

PostPosted: Tue Nov 16, 2010 9:20 pm
Reply with quote

Hi Dick,

Part of my point - but in these days of political correctness are not gender-related references considered not to be PC? icon_lol.gif

g.
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