Shell scripts and job submission

Hi,

I have a sql script installed in job submission. It is a data extract and it runs with a list of CRN's as its parameters. Except for a different list of CRN's, the same job is used for different computer labs that need extracts of users and courses. CIS is one example, MATH is another.

My problem is naming the output based on the list of CRN's used. We use Linux and I can add an "mv" command to the shell script to rename the output but I am stuck on how to rename it using parameters from the job that will uniquely identify the output. For example, I want to name the output files as CIS.xxx and MATH.xxx

In the shell script that is used to run the job (submitted via GJAPCTL) the only parameters I have found about (so far) are:

# p1 = username
# p2 = password
# p3 = jobno
# p4 = program name
# p5 = printer

Is there access to the "Special Print" parameter in the GJAPCTL form? Is there access to the actual paramters themselves? I could add one that identified the type of extract.

Any help will be appreciated.

Thanks in advance.

Jay

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Shell scripts and job submission

Look at gjajobs.shl and you can see what parameters are available when running a job. Many of them end up as environment variables. If you want the job's parameters that are specified on GJAPCTL, you can select them from GJBPRUN using the job's name, one-up number and parameter number.