#BEGINJOBFORM
#/---------------------------------------------------------------------
#/ This is the top-level template for a staged install (ACTION C). It
#/ generates jobs to allocate MVS datasets, copy the production SASHELP
#/ to a staged copy, apply the new setinit to the staged SASHELP, copy
#/ the PREEDIT dataset to a staged copy, copy SAS data libraries to
#/ staged copies, TSO RECEIVE the MVS PDS content, import SAS registry
#/ updates and post-process them, load the USS content into SASHOME,
#/ run the help doc setup if required, load SAS compiled macro and data
#/ library content, customize the configuration with the customer's
#/ settings, and release unused space in the MVS datasets. A post-install
#/ job is generated to update the deployment registry, initialize the VJR
#/ cache, and update the valid job drivers.
#/
#/ The last job generated in the sequence is the promotion job, which
#/ is not submitted automatically. The user will submit that job once
#/ testing is complete and they are ready to update their production
#/ datasets.
#/---------------------------------------------------------------------
#SYMBOLCALLS ENTRY;CUSTPRODQUAL;TMPUNI;WORKSPC;SYSOUT;CNTLDSN;
#JOBINFO Allocate MVS datasets required for the products being installed
#BUCKETINSERT BucketDefDsnallocstg.txt #/ Test for needed MVS datasets and create new if needed
#BUCKETINSERT BucketDefDsnallocML.txt #/ Test for needed MVS datasets and create new if needed
#SNIPPETINSERT ChainJob.txt
#/
#/ For hotfixes we have to skip the separate copy of SASHELP and the
#/ setinit processing - hotfixes don't include a setinit. If the
#/ hotfix contains SASHELP content, BucketDefDsnallocstg will have
#/ created the staged SASHELP, and CopySDL will generate the copy
#/ of the production content to the staged dataset.
#/
#IFEQ [HOTFIX] TRUE #THEN SKIPHELP
#JOBBOUNDARY
#SET [SYSNAME] {JOBNAME}  #/ Set SYSNAME variable name to argument value.
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Copy the production SASHELP content into the staged SASHELP
#SNIPPETINSERT CopyRegistry.txt
#SNIPPETINSERT ChainJob.txt
#IFEQ [UPDATEMODE] TRUE #THEN SKIPSI
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Apply the new setinit to the staged SASHELP
#SNIPPETINSERT ApplyNewSetinit.txt  #/ Apply the new setinit to the staged library
#SNIPPETINSERT ChainJob.txt
#SKIPSI
#SKIPHELP
#/ Copy staged content up into staged libraries
#/ from base install so that when action D runs, everything is able
#/ to be copied back down (otherwise the IEBGENER whacks all content,
#/ and the non-changed content never gets replaced).  Also, we need
#/ to make sure we're in update mode, because we don't want to do
#/ a copyup in the event of an add-on or reinstall, because we would
#/ possibly blow away previously applied maintenance or setinits
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Copy production data into staged libraries to preserve
#JOBINFO data that did not change. Same for SAS data libraries.
#BUCKETINSERT CopyPreedit.txt
#BUCKETINSERT CopySDL.txt
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO TSO RECEIVE all PDS/PDSE content and select only incoming
#JOBINFO modules that are newer than the production version
#BUCKETINSERT BucketDefTSOReceive.txt
#BUCKETINSERT ActionBCModuleCheck.txt
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Import SAS registry content and perform registry post-processing
#IFEQ [HOTFIX] TRUE #THEN SKIPREMOVE
#BUCKETINSERT SASRegistryRemove.txt #/ S1354598: remove old registry item store
#SKIPREMOVE
#BUCKETINSERT BucketDefSASRegistryImportStg.txt  #/ proc registry import statements 9.3 now
#/ Post process is placed here in case maintenance for these two comes thru
#BUCKETINSERT BucketDefSASRegistryPostProcess.txt #/ host specific registry fix base prod
#BUCKETINSERT NickName.txt #/ proc nickname adds for core catalog
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Unload all USS content into SASHOME
#BUCKETINSERT BucketDefUnloadUSS.txt #/ unload USS content
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Copy in SAS compiled macro and data library content
#BUCKETINSERT BucketDefULSASCompMacr.txt   #/ proc catalog for sas compiled macros MUST BE SEPARATE JOB STEP
#BUCKETINSERT BucketDefULSASDataLibStg.txt #/ proc fcopy sas datalib statements.
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Perform symbol substitution on config, proc, clist, rexx, JCL files
#JOBINFO and copy out to their final destinations
#BUCKETINSERT BucketDefXXSaseditx.txt  #/ Edit invoke devices and editable files
#BUCKETINSERT BucketDefXXCopyOut.txt  #/ Copy out invoke devices not resized by SAS.
#BUCKETINSERT BucketDefXXCopyOutSAS.txt #/ Copy out TKMVSENV to FB 560 dataset
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Perform symbol substitution on TKMVSENV members
#BUCKETINSERT RunJavaEditX.txt         #/ edit TKMVSENV members
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Release unused space in datasets
#BUCKETINSERT FreeSpace.txt        #/ Free the space
#BUCKETINSERT FreeSpaceB.txt       #/ proc release stmts
//
#/---------------------------------------------------------------------
#/ This is the job for a staged install promotion (ACTION D). This is
#/ a separate job to copy all updated content from the staged datasets
#/ to the production datasets. This job is not submitted, it is stored as
#/ a separate member in the control dataset so that it can be submitted
#/ manually by the user after completing testing of the staged install.
#/---------------------------------------------------------------------
#JOBBOUNDARY
#SET [SYSNAME] {JOBNAME}  #/ Set SYSNAME variable name to argument value.
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#/---------------------------------------------------------------------------
#/ Need to split the Promote job into two jobs due to JES 3 system
#/ restriction of allocating and utilizing datasets in the same job stream
#/---------------------------------------------------------------------------
#JOBINFO Allocate any new production datasets needed
#SET [PROMOTE] TRUE               #/ Force PROMOTE processing for PROMOT jobs
#BUCKETINSERT PromoteDSNexist.txt #/ check for existence of datasets
#SNIPPETINSERT ChainJob.txt
#JOBBOUNDARY
#SET [SYSNAME] {JOBNAME}  #/ Set SYSNAME variable name to argument value.
[JOBCARD1]
[JOBCARD2]
[JOBCARD3]
[JOBCARD4]
[JOBCARD5]
#JOBINFO Copy staged datasets to production
#JOBINFO Post-install processing: update the deployment registry,
#JOBINFO initialize the VJR cache, update the valid job drivers
#JOBINFO Perform symbol substitution on config, proc, clist, rexx, JCL files
#JOBINFO and copy out to their final destinations
#JOBINFO Perform symbol substitution on TKMVSENV members
#BUCKETINSERT PromotePDS.txt  #/ iebcopy staged to production datasets
#BUCKETINSERT PromoteSDL.txt  #/ IDCAMS staged to production datasets
#SNIPPETINSERT RunPostInstall.txt  #/ registry update, vjr cache refresh valid job drivers
#PROMOTEPROCESSING #/ Forces next steps to use production datasets
#BUCKETINSERT BucketDefXXSaseditx.txt  #/ Edit config/clist/proc files
#BUCKETINSERT BucketDefXXCopyOut.txt   #/ Copy out edited files
#BUCKETINSERT RunJavaEditX.txt         #/ edit TKMVSENV members
#ENDPROMOTEPROCESSING #/ Reset to staged datasets
//
#/---------------------------------------------------------------------------
#/  When doing a hotfix we do not need to generate the help system code
#IFEQ [HOTFIX] TRUE #THEN SKIPDOCSETUP
#/---------------------------------------------------------------------------
#JOBBOUNDARY
#JOBINFO Run the help doc setup.  This is an optional job if you want to
#JOBINFO utilize the Help system online and is submitted separately.
#JOBINFO Depending on your hardware and other jobs running,
#JOBINFO it could take an hour or more to run.
#BUCKETINSERT HelpDocsetup.txt  #/ invoke the process to create help .xml files not for z64
//
#SKIPDOCSETUP
#ENDJOBFORM
