AS400 Shell command

335 pts.
Tags:
AS/400 CSV
AS400 - STRQSH
AS400 Shell command
CSV
Shell commands
Hi  Iam using jar command to comprees the csv file to Zip file.in my program.iam submitting the job,usually it oftens fails for few files to zip.it gives me the error like qsh: 001-0012 Error found starting child process. System resources not available to complete request. So how can i solve this issue within in my program.Please advice me on this.I need ur help.  Thanks in advance.

Software/Hardware used:
As400 -Shell command
ASKED: May 23, 2011  11:54 AM
UPDATED: May 24, 2011  6:32 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Change the subsystem description to allow more jobs to run: CHGSBSD SBSD(MySbs) MAXJOBS(n+2) where n = current MAXJOBS. This should not cause a problem with regular batch jobs — it will not suddenly start running multiple batch jobs at once. Let’s say your subsystem MySbs has 1 jobq MyJobQ assigned to it, and MyJobQ has a Max Active (MAXACT) of 1. That means only 1 batch job can run at the same time, but the subsystem’s MAXJOBS will allow the QSHELL command’s subsidiary jobs to run as well. The QSHELL jobs aren’t “normal” batch jobs — they’re type BCI, Batch Immediate, and do not pass through a subsystem to run.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Mariodlg
    There are some things that makes the command to fail, commonly when you are submitting the command. Needs your script the interactive subsystem? Check the authority of the profile that is submitting the job and check the library list. Also check for the subsystem max jobs parameter with the command CHGSBSD . Post more information about your script and the scenario it is intended to run. Regards.
    2,790 pointsBadges:
    report
  • TomLiotta
    it oftens fails... If it doesn't fail every time, then I would look at 'Maximum jobs in subsystem' first. In order to run a shell function, a shell job needs to be started. The shell job will run in the same subsystem where you executed the shell command. If the maximum number of jobs are already running, then the subsystem won't allow the shell job to start. Mariodlg mentioned this when he suggested looking at the subsystem description with the CHGSBSD command. You can also use the DSPSBSD command and look under option 1, 'Operational attributes'. Be aware that you might need to take care if you increase the maximum number of jobs allowed in a subsystem. The subsystem might be limited for a reason. If the maximum shouldn't be increased, then these shell commands should be submitted to a different subsystem through a different job queue. Tom
    125,585 pointsBadges:
    report
  • iiiiiiiiiiiii
    Hi Thanks for ur valuable answers. So pls check my coding below. CPYTOIMPF FROMFILE(ARCPGM/&WFLENM) TOSTMF(&CSVDIR) + MBROPT(*ADD) STMFCODPAG(*PCASCII) + RCDDLM(*CRLF) DTAFMT(*DLM) NULLIND(*YES) /*above command does the copying the physical file to IFS as a csv file*/ CHGVAR VAR(&CSVDIR1) VALUE('jar' *BCAT 'cfM' *BCAT + '/' *TCAT &USER *TCAT '/' *TCAT &WOutfn + *TCAT '_US' *TCAT '_' *TCAT &WRKDT *TCAT + '.ZIP' + *BCAT '/' *TCAT &USER *TCAT '/' + *TCAT &WOUTFN *TCAT '_US' *TCAT '_' *TCAT + &WRKDT *TCAT '.CSV') /* this command iam making the jar command here for example like this jar cfM /foldername/filename_us_23052011.zip /fodername_us_2305211.csv */ STRQSH CMD(&CSVDIR1) and then iam using the shell command. So my question is there any way can we get the failure or escape mseesge by using monmsg....if it fails to do the zipping,we should make it run the command again,untill it success. Please suggest wat steps need to be include. Thanks
    335 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following