Link to home
Start Free TrialLog in
Avatar of Shift-3
Shift-3Flag for United States of America

asked on

script to hold job queues

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

ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shift-3

ASKER

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?
Avatar of Shift-3

ASKER

Never mind to the follow-up.  I worked it out.
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