<?xml version="1.0" encoding="utf-8"?>
<Session ID="/baanerp/tt/aad/ttaad5205m000" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Add Shell Command to Job (ttaad5205m000)</Title>
	</Header>
	<HelpTopic xml:lang="en"><AimSection><Paragraph class="Default"> 
                                 Use this session to add a <Link href="/baanerp/tt/glossary/glossary#100026" role="glossary">shell command</Link> (script) to a <Link href="/baanerp/tt/glossary/glossary#000025" role="glossary">job</Link>. In this way you can manipulate the job’s execution.</Paragraph>
			<Paragraph class="Default">You can also link a command file (cmd file), or a Visual Basic script.</Paragraph>
		</AimSection>
		<RelatedTopics><SectionTitle>
                                 Related topics
                              </SectionTitle>
			<RelTopic><Link href="/baanerp/basictasks/000039" role="manual">To add a session to a job</Link>
			</RelTopic>
			<RelTopic><Link href="/baanerp/tt/onlinemanual/100012" role="manual">To add a shell command to a job</Link>
			</RelTopic>
			<RelTopic><Link href="/baanerp/basictasks/000005" role="manual">To use a details session</Link>
			</RelTopic>
		</RelatedTopics>
	</HelpTopic>
	<Fields><FieldHelp ID="shell.cmd"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Shell script</Title>
			</Header>
			<FuncDesc>The command or script that you can add to a <Link href="/baanerp/tt/glossary/glossary#000025" role="glossary">job</Link>.</FuncDesc>
			<SimpleSection><Paragraph class="Default">See the following examples:</Paragraph>
				<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><THEAD><TR><TD rowspan="1" colspan="1">Type</TD>
							<TD rowspan="1" colspan="1">Example</TD>
						</TR>
					</THEAD>
					<TBODY><TR><TD rowspan="1" colspan="1">shell command</TD>
							<TD rowspan="1" colspan="1">/usr/local/bin/transfer_files</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">CMD file</TD>
							<TD rowspan="1" colspan="1">C:\Program Files\Own\bin\DemandJobMail.cmd</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Visual Basic script</TD>
							<TD rowspan="1" colspan="1">/c C:\Program Files\Own\bin\DemandJobMail.vbs</TD>
						</TR>
					</TBODY>
				</TABLE>
			</SimpleSection>
		</FieldHelp>
		<FieldHelp ID="shell.args"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Script Arguments</Title>
			</Header>
			<FuncDesc>The parameters or arguments for the command or script.</FuncDesc>
		</FieldHelp>
		<FieldHelp ID="okay.val"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Return value "successful"</Title>
			</Header>
			<FuncDesc>The return value of the command or script which is sent to the job program. If the command or script is executed successfully, the job process continues. If the command or script has not been executed successfully, the job process will terminate.</FuncDesc>
		</FieldHelp>
	</Fields>
	<FormCommands><CommandHelp ID="exec.cont.process"><Header>
				<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Test script</Title>
			</Header>
			<FuncDesc>To ensure that the command or script has the right effect on the job, you must test it. Typically, to test the job and the command or script, you must redirect the output of the command or script to a file or printer. To redirect the output, you can use the operating system's redirection facilities in the code of the command or script. For example: in a Unix shell script, you can use the &gt; character to redirect the output to a file.</FuncDesc>
		</CommandHelp>
	</FormCommands>
</Session>
