|
Hi All, I am using this code to run the qsh in batch and it is not working. When I remove the SBMJOB command and call the CL interectively it works fine. Can someone advise me as what's wrong with this setup.
DCL VAR(&COMMAND) TYPE(*CHAR) LEN(65)
CHGVAR VAR(&COMMAND) VALUE('qsh cmd(find + /apinder/aps1/aps2/aps3 ! -name A1 | + xargs rm -f)')
SBMJOB CMD(qsh cmd(&command)) with thanks & regards Manoj S.T
-----Original Message----- From: Vern Hamberg [mailto:vhamberg@xxxxxxxxxxxxxxxxxxxxxxxxx] Sent: Monday, June 09, 2003 9:08 PM To: Midrange Systems Technical Discussion Subject: Re: Ending 'qsh' session programmatically
In batch the session runs, then ends. Anything that went to the screen goes to a spooled file (QPRINT on our system). There are usually 2 joblogs, as well - QP0ZSPWP & QZSHSH. When I do this interactively I get a message to press ENTER to continue, not F3.
Are you doing things that do not require a display to the user? Then I suggest, in your CL, using
SBMJOB CMD('qsh cmd(''' *cat &cmdstring *cat ''')')
I'm not completely sure of the double apostrophes - try it out.
You can set an environment variable, in order to get the job names.
ADDENVVAR ENVVAR(QIBM_CHILD_JOB_SNDINQMSG) VALUE(2)
sends inquiry messages with the qualified job name - you can get the job name, then respond with 'G' to keep going. This'd require 2 RCVMSG commands.
Another environment variable
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE)
suppresses output. (new in V5R2)
You could DLTSPLF to get rid of the joblogs.
Go to infocenter for more info
HTH
Vern
At 06:33 PM 6/9/2003 +0530, you wrote: >Hi All, >I have created a cl program which executes commands in qsh > >qsh command(&commandstring) > >how do i end this qsh session programmatically, i have tried >qsh command('exit') >qsh command('end') > >but it still prompts me to end the session with an F3-function key. >If i need to run the same in batch , will i have to be aware of anything. > >Thanks & Regards >Manoj
_______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.