Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

script to hold job queues

Posted on 2009-04-08
5
745 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 35

Accepted Solution

by:
Gary Patterson earned 500 total points
ID: 24101815
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
ID: 24106652
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
ID: 31568258
Never mind to the follow-up.  I worked it out.
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24110495
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

839 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