<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/basictasks/000039" xml:lang="en">
   <Header>
      <Title>To add a session to a job</Title>
   </Header>
   <GeneralSection>
      <ProcedureList>
         <ListIntro>To add a session to a job, take the following steps:</ListIntro>
         <ListItem>Start the session that you want to add to the job, and fill
		  out the fields in the regular way.</ListItem>
         <ListItem>Click <GUIRef href="" role="manual">Add to Job</GUIRef>. The <GUIRef href="/baanerp/tt/aad/ttaad5102s000" role="session">Add Session to Job (ttaad5102s000)</GUIRef> session starts.</ListItem>
         <ListItem>Enter the job code in the <GUIRef href="/baanerp/tt/aad/ttaad5102s000#cjob" role="manual">Job</GUIRef> field.</ListItem>
         <ListItem>Enter the session sequence number. The sequence number
		  indicates the order in which the sessions that you add to the job are executed.</ListItem>
         <ListItem>If you want the session to be executed, select the <GUIRef href="/baanerp/tt/aad/ttaad5102s000#active" role="manual">Active</GUIRef> check box.</ListItem>
         <ListItem>If you want LN to skip the session when the job runs, clear
		  the <GUIRef href="/baanerp/tt/aad/ttaad5102s000#active" role="manual">Active</GUIRef> check box. You can use
		  this function to include or exclude sessions from the job without redefining
		  the job.</ListItem>
         <ListItem>If the session generates output during the job, you must select
		  an output device from the <GUIRef href="/baanerp/tt/aad/ttaad3500m000" role="session">Device Data (ttaad3500m000)</GUIRef> session. If you select a device of the <GUIRef href="" role="manual">Append to File</GUIRef> or <GUIRef href="" role="manual">Rewrite File</GUIRef> type , you must enter a file
		  name.</ListItem>
         <ListItem> 
            <List>
               <ListIntro>You can optionally use the fields in the <GUIRef href="" role="manual">Error Handling</GUIRef> box to:</ListIntro>
               <ListItem>Indicate how LN must continue if there is an error
				during the execution of the session.</ListItem>
               <ListItem>Indicate that LN must execute, or skip, a number of
				sessions of the job, if there is an error during the execution of the session.</ListItem>
            </List>
         </ListItem>
         <ListItem>Click <GUIRef href="" role="manual">OK</GUIRef> to add the session to the job and
		  close the <GUIRef href="/baanerp/tt/aad/ttaad5102s000" role="session">Add Session to Job (ttaad5102s000)</GUIRef> session.</ListItem>
         <ListItem>Repeat these steps for each session that you want to include in
		  the job.</ListItem>
      </ProcedureList>
      <Note>
         <SectionTitle>Note</SectionTitle>
         <Paragraph>To include a shell script in a job, start the <GUIRef href="/baanerp/tt/aad/ttaad5205m000" role="session">Add Shell Command to Job (ttaad5205m000)</GUIRef> session.</Paragraph>
      </Note>
   </GeneralSection>
   <RelatedTopics>
      <SectionTitle>Related topics</SectionTitle>
      <RelTopic>
         <Link href="/baanerp/basictasks/000037" role="manual">To use jobs</Link>
      </RelTopic>
      <RelTopic>
         <Link href="/baanerp/basictasks/000038" role="manual">To define a job</Link>
      </RelTopic>
      <RelTopic>
         <Link href="/baanerp/basictasks/000041" role="manual">To run a job</Link>
      </RelTopic>
   </RelatedTopics>
</ManualTopic>