Solved

script to hold job queues

Posted on 2009-04-08
5
736 Views
Last Modified: 2013-12-06
I want to create a very simple script which just puts some AS/400 job queues on hold.  I'm a complete neophyte to CL programming, but from the reference materials I've been able to cobble together the commands below which should do the trick.

Now, how do I compile this and run it?

Is there an easier way to do this, say with a REXX script?

PGM

HLDJOBQ JOBQ(FOO)

HLDJOBQ JOBQ(BAR)

ENDPGM

Open in new window

0
Comment
Question by:Shift-3
  • 2
  • 2
5 Comments
 
LVL 34

Accepted Solution

by:
Gary Patterson earned 500 total points
Comment Utility
CRTCLPGM to compile
CALL to execute

You can do a Rexx script if you like.  Can't say it is any easier.

See the CL Programmer's Guide - it has everything you need:

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c4157215.pdf

- Gary Patterson
0
 
LVL 38

Author Comment

by:Shift-3
Comment Utility
Pretend for a moment that I don't know anything about metallurgy, engineering, or CL programming.  Can you give more specific examples of command syntax one would use?

I'm looking at the manual, but to describe it as abstruse would be charitable.

Before I can compile the program, I have to enter the commands into a source file using STRSEU, right?  Are there any other intermediate steps?
0
 
LVL 38

Author Closing Comment

by:Shift-3
Comment Utility
Never mind to the follow-up.  I worked it out.
0
 
LVL 34

Expert Comment

by:Gary Patterson
Comment Utility
glad you figured it out.  for anyone else that might look here:

1) Create a source file to hold your source code using the CRTSRCPF command.  OPM CL source is usually stored in a file called QCLSRC, and ILE C source is often stored in CLLESRC.  You can call it anything, but it may confuse others.  Sample source files exist in QGPL, and you can copy them using CRTDUPOBJ if you prefer.

2) Use SEU to enter the source code (WRKPDM or STRSEU).  F4 and F1 are your friends.  Press them a lot in various regions of the SEU screen.  Type a command name and press F4 for prompt help with parameters.  Press F4 without typing a command to get a series of command menus to help you find the command you need.  Press F1 any time for help.

3) Compile using PDM option 14, or CRTCLPGM command

4) Execute using PDM "C" option or CALL command

- Gary Patterson
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now