Re: Running a job in AIX
- From: "steven_nospam at Yahoo! Canada" <steven_nospam@xxxxxxxx>
- Date: 22 Mar 2006 08:12:20 -0800
StephenRichter@xxxxxxxxx wrote:
Looking to compare features of AIX and OS400 ...
How do you submit a job to run on AIX? Once it is running, can I hold
it, release it, cancel it? Can I display how much CPU it is using, can
I display all the jobs running on the system and see the share of the
system each job is using?
The "at" command that can be used to start a batched job now or at a
specific time. There is also the cron daemon that lets you submit a job
on a regular basis, such as every morning at 8am. There is the "atq"
command to show what is in the queue, and "atrm" command to cancel
jobs.
Our company created special "batch" queues in the qdaemon subsystem
that lets us queue up batch jobs much like you would do for a print
job. For example, we create a short script that sets our environment
and then calls a COBOL program, and then we simply use the lp command
to submit to that queue, whose backend program is /bin/ksh instead of
piobe (the standard printer I/O backend).
CPU usage can be seen for each process using the ps command.
Here is a scenario. I run a job every morning. It checks an ftp site
for a file. If the file is there, it receives the file, copies the file
into an sql table, then runs an sql procedure to process the data in
the table.
What AIX facility would I use to submit the job everyday at 8am? The
code that runs this job, what language would it be written in? The
automated FTP work, how is that done?
What facility would I use to copy the FTP stream file, containing comma
delimeted columns in text line rows, into an SQL table?
Then the final step, how would I initiate the sql procedure to process
the received table?
This can easily be done using a Korn shell script, FTP service, and a
..netrc file. I would put the script in CRON to run at 8am, it would
start, connect to the FTP site, retrieve the file (if any exist),
confirm whether a file was received, and then call the appropriate SQL
script to do the insertion.
I would recommend that you get a copy of "Learning the Korn Shell" from
O'Reilly & Associates or "Korn Shell Command And Programming Language"
from Bolsky/Korn as these can help get you familiar with scripting
techniques for the AIX environment.
Keep in mind that your UNIX system may be using Bourne shell or C-Shell
instead of Korn. In that case, you will want to pursue other guides.
If time permits, I will publish a sample Korn shell script.
Steve
.
- Follow-Ups:
- Re: Running a job in AIX
- From: StephenRichter
- Re: Running a job in AIX
- References:
- Running a job in AIX
- From: StephenRichter
- Running a job in AIX
- Prev by Date: PDF Printing on AIX
- Next by Date: Re: Running a job in AIX
- Previous by thread: Running a job in AIX
- Next by thread: Re: Running a job in AIX
- Index(es):
Relevant Pages
|