SMA Installation Jobs

The following example job shows the principles of SMA installation jobs:

 /.I055  LOGON  SAG,12345678, 'PASSWORD'                                   (1)
 / REMARK   +----------------------------------------------------------+
 / REMARK   I JOB-NAME : E.I055                                        I
 / REMARK   I FUNCTION : ASSEMBLE BATCH NATURAL                        I
 / REMARK   I ENVIRONM.: SMA  (2005/09/19 10:10:38)                    I
 / REMARK   I LOGFILE  : L.I055.SMA                                    I
 / REMARK   +----------------------------------------------------------+
 /          ASSIGN-SYSOUT  L.I055.SMA                                      (2)  
 /          SHOW-JOB-STATUS                                              
 /          ADD-PASSWORD  X'00000000'                                      (3)  
 /          CALL-PROC (SMA.JOBLIB,P.REPORT),                            -  (4) 
 /             (TEXT='===============================================', -
 /              STEP='I055 START')                                       
 / REMARK   SKIP-COMMANDS  TO-LABEL=????????    "<== MODIFY IF RESTART"    (5)   
 / REMARK   +----------------------------------------------------------+ 
 / REMARK   I JOB=I055  STEP=0216  PRODUCT=NATnnn                      I 
 / REMARK   +----------------------------------------------------------+ 
 /.STEP0216 REMARK ANATSTUB                                                (6)
 /          CALL-PROCEDURE                                              -
 /            (SMA.JOBLIB, P.ASSEMBLE), (                               -
 /                SOURCE   = ANATSTUB,                                  -
 /                SRCLIB   = SMA.JOBLIB,                                -
 /                ALTLIB   = $SAG.NATnnn.MAC,                           -
 /                OUTMOD   = SMA.JOBLIB,                                -
 /                STEP     = 'ANATSTUB')                                 
 / REMARK   +----------------------------------------------------------+ 
 / REMARK   I JOB=I055  STEP=0217  PRODUCT=NATnnn                      I 
 / REMARK   +----------------------------------------------------------+ 
 /.STEP0217 REMARK ANATFRNT                                              
 /          CALL-PROCEDURE                                              -
 /            (SMA.JOBLIB, P.ASSEMBLE), (                               -
 /                SOURCE   = ANATFRNT,                                  -
 /                SRCLIB   = SMA.JOBLIB,                                -
 /                ALTLIB   = $SAG.NATnnn.MAC,                           -
 /                OUTMOD   = SMA.JOBLIB,                                -
 /                STEP     = 'ANATFRNT')                                 
 /          ... 
 /.NORMEND  REMARK +---------------------------------------------------+   (7) 
 /          REMARK I NORMAL END OF JOB I055                            I 
 /          REMARK +---------------------------------------------------+ 
 /          CALL-PROC (SMA.JOBLIB,P.REPORT),                            -  (4) 
 /             (TEXT='OK NORMEND', STEP='I055')                          
 /          ASSIGN-SYSOUT *PRIMARY                                       
 /          CALL-PROC (SMA.JOBLIB,P.REPSTORE),                          -
 /             (REPORT=L.I055.SMA)                                      
 /          SKIP-COMMANDS  TO-LABEL=LOGOFF                               
 /.ABEND    SET-JOB-STEP                                                   (8)
 /          REMARK +---------------------------------------------------+ 
 /          REMARK I ABNORMAL END OF JOB I055                          I 
 /          REMARK +---------------------------------------------------+ 
 /          CALL-PROC (SMA.JOBLIB,P.REPORT),                            -  (4) 
 /             (TEXT='** JOB ABEND, SEE FILE L.I055.SMA*',              -
 /              STEP='I055 ABEND')                                       
 /.LOGOFF   EXIT-JOB  SYS-OUT=*NONE     


Notes:

  1. LOGON Command. The first command in a job (ENTER file) generated by SMA is the LOGON command (in the ISP syntax format). It is possible to specify the operands of this command in the SMA parameter LOGON-PARM.
  2. Report and Logging Files. The job assigns the SYSOUT file as logging file.
  3. Password Protected Files. If you want to protect any file used by SMA with a password, you can specify this password with the SMA parameter JOBPASS.
  4. Report Entry. At the beginning and at the end of every job a report entry is written to the report file L.REPORT (by calling procedure P.REPORT). It is also possible to use your own report file for an SMA environment by setting the the SMA parameter OWN-REPORT to the value YES.
  5. Restart. In case of a restart situation, you can skip directly to the corresponding label of an installation step. If the BS2000/OSD product Jobvariables is available, this will be done automatically by SMA if the SMA parameter RR (Restart Routine) is set to YES.
  6. Call Procedure. Every installation step is executed by calling a procedure which is located in the library JOBLIB. Each procedure uses its own logging file.
  7. Normal End of Job. If the job terminates normally, the logging file is stored in the library REPLIB by calling the procedure P.REPSTORE. Software AG strongly recommends to check the logging files of every job (and procedure) even though the job has terminated normally.
  8. Abnormal End of Job. If the job terminates abnormally, the logging file is not stored in the library REPLIB. If you use the restart routine of SMA (parameter RR) you can submit this job again (without changing the job itself) after you have resolved the error.