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
 

 

How to clear a queue in rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to clear a queue in rexx
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Nov 15, 2010 11:02 pm    Post subject:
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    Post subject: Reply to: How to clear a queue in rexx
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 12:35 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Nov 16, 2010 12:39 pm    Post subject: Reply to: How to clear a queue in rexx
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    Post subject: Reply to: How to clear a queue in rexx
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 1:42 pm    Post subject: Re: Reply to: How to clear a queue in rexx
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 16, 2010 1:46 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 1:51 pm    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 16, 2010 1:58 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 2:05 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Nov 16, 2010 2:09 pm    Post subject: Reply to: How to clear a queue in rexx
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

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Nov 16, 2010 2:36 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Nov 16, 2010 4:02 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 4:05 pm    Post subject:
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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 16, 2010 9:16 pm    Post subject: Reply to: How to clear a queue in rexx
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

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Nov 16, 2010 9:20 pm    Post subject:
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    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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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