335 pts.
 AS400 Shell command
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:
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.
Last Wiki Answer Submitted:  October 12, 2012  5:51 pm  by  N0handle   15 pts.
All Answer Wiki Contributors:  N0handle   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.

 

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

 107,735 pts.

 

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 pts.