Go to the bottom.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! SDDL Name:	QGINSTRUCT.SDDL
!
! Purpose:      This SDDL file defines the qginstruct relation.
!
! Modification History:
!
!   Date       PR      Who                       Reason
! --------   -------   ---   -------------------------------------------------
! 11/ 7/94   27329     SXT   Original implementation
! 08/16/96   29960     MRB   Add C output
! 03/12/99   38555     MRB   Remove instruction versions (version_num field)
! 12/13/99   39695     bao   Remove obsolete fields from qgformat and 
!			     qginstruct relations
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
 
LANGUAGE  C, FORTRAN, SQL

INCLUDE  ZSPSS_USER_TYPES.SDDL
 
RECORD  QGIN_TYPE
 
!------------------------------------------------------------------------------
!
!   RECORD INFORMATION
!
!------------------------------------------------------------------------------
 
 
    DESCRIPTION   
	
	"This relation holds general information for instructions. The purpose 
    of instructions is to transform science activity descriptions into groups 
    of Science Mission Specification(SMS) statements. An instruction is usually
    linked to each exposure of a science activity.

        Instructions are part of SCPL, and are similar to subroutines or 
    modules. An instruction is used to group a set of pseudo-instructions, 
    primitives and other instruction invocations under one name, such that 
    the name can be used in place of, or for the purpose of, executing the 
    set.
  
	There are various types of instructions(see field instr_type below).
    Some are PDB pre-defined, some are supplied by SOGS, others are built by
    the user. 

        The instruction scenario leading up to the generation of SMS is:
        - Create instructions linked to Calendar activities.
        - Enter these instructions into the instruction database.
        - Validate the instructions.
        - Expand the instructions to produce a Logical SMS.

        The relation QGINSTRUCT stores high level information that is needed 
    during the above processes. If an instruction is PDB pre-defined, fields 
    in this relation are populated by the IMTOOL (via IMTPZG). Otherwise, they 
    are populated during the above processes."
 
!------------------------------------------------------------------------------
!
!   FIELD INFORMATION
!
!------------------------------------------------------------------------------
 
 

    FIELD  instr_name
        TYPE INSTRUCTION_NAME_TYPE
        FORM
            NAME         "INS"
            LABEL        "INSTRUCTION NAME"
        END_FORM
    END_FIELD
 
 

    FIELD  si_id
        TYPE SI_ID_TYPE
        DESCRIPTION     "This field indicates the SI to which the primitive 
                        instruction applies. This field can be blank for non 
                        primitive instructions."
        FORM
            NAME         "INS"
            LABEL        "SI ID (CSTR/FOC/FOS/FGS/HRS/HSP/NIC/STIS/WFII/WFPC)"
        END_FORM
    END_FIELD
 
 

    FIELD  instr_type
        TYPE            C3
        DESCRIPTION     "This the instruction type. An instruction can have
                        the following valid types:
                        CMD = PDB defined command
                        CSE = PDB defined command set
                        TBL = PDB defined table
                        PSU = SOGS pseudo-instruction
                        SIP = SOGS invokable procedure
                        DBK = PDB defined data block   
                        CND = SOGS conditional
                        TXT = SOGS TEXT block
                        CMT = SOGS COMMENT block
                        MIS = SOGS miscellaneous                   
                        TCS = user-built temporary command set
                        TOP = user-built top level instruction
                        TMP = user-built temporary command
                        CMP = user-built compound
                     
                        The default instruction type is 'TOP'."
        FORM
            NAME         "INS"
            LABEL        "TYPE  (TCS/TOP/CMP/TMP)"
        END_FORM
        DISCRETE        "CMD", "CSE", "TBL", "PSU", "SIP", "DBK", "CND", 
                        "TXT", "CMT", "MIS", "CMP", "TCS", "TMP", "TOP"
    END_FIELD
 
 

    FIELD  tbl_fmt
        TYPE TABLE_NAME_TYPE
        DESCRIPTION     "This field holds the table format name. It is used 
                        only by an instruction whose type is 'TBL'. This table 
                        format name points to records which store: 
                             - the format of the table, in relation QGFORMAT.
                             - array information of parameters of the table 
                                of this instruction, in relation QGTABLEPARM.
                        The format and parameter of an instruction which 
                        defines part of a table is loaded to the relation by 
                        IMTOOL from the PDB tape."
        FORM
            NAME         "INS"
            LABEL        "INSTR. TYPE TABLE FORMAT NAME"
        END_FORM
        RELATED_FIELDS  "qgformat.tbl_fmt_name" "qgtableparm.tbl_fmt_name"

    END_FIELD
 
 

    FIELD  obc_prt
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the PRT(Planned Real Time) command set 
                        flag for the OBC(On-Board Computer). This field 
                        indicates whether this command set instruction can be 
                        used as a PRT command set. It is a display only field. 
                        The valid values of this field are the following:
                            Y = can be used as a PRT command set on the OBC.
                            N = can not be used as a PRT command set on the OBC.
                            blank =  if this is a non primitive instruction."
        FORM
            NAME         "INS"
            LABEL        "PRT"
        END_FORM
    END_FIELD
 
 

    FIELD  obc_drts
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the RTS(Relative Time Sequence) command 
                        set flag for the OBC DF-224. This field indicates 
                        whether this command set instruction can be used as a 
                        RTS command set on DF-224. It is a display only field. 
                        The valid values of this field are the following:
                            Y = can be used as a RTS command set on DF-224.
                            N = can not be used as a RTS command set on DF-224.
                            blank = not applicable."
        FORM
            NAME         "INS"
            LABEL        "DRTS"
        END_FORM
    END_FIELD
 
 

    FIELD  obc_nrts
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the RTS(Relative Time Sequence) command 
                        set flag for the OBC NSSC-1. This field indicates 
                        whether this command set instruction can be used as a 
                        RTS command set on NSSC-1. It is a display only field. 
                        The valid values of this field are the following:
                            Y = can be used as a RTS command set on NSSC-1.
                            N = can not be used as a RTS command set on NSSC-1.
                            blank = not applicable."
        FORM
            NAME         "INS"
            LABEL        "NRTS"
        END_FORM
    END_FIELD
 
 

    FIELD  obc_datp
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the ATP(Absolute Time Processor) command
                        set flag for the OBC DF-224. This field indicates 
                        whether this command set instruction can be used as a
                        ATP command set on DF-224. It is a display only field. 
                        The valid values of this field are the following:
                            Y = can be used as a ATP command set on DF-224.
                            N = can not be used as a ATP command set on DF-224.
                            blank = not applicable."
        FORM
            NAME         "INS"
            LABEL        "DATP"
        END_FORM
    END_FIELD
 
 

    FIELD  obc_natp
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the ATP(Absolute Time Processor) command
                        set flag for the OBC NSSC-1. This field indicates 
                        whether this command set instruction can be used as a 
                        ATP command set on NSSC-1. It is a display only field.
                        The valid values of this field are the following:
                            Y = can be used a ATP command set on NSSC-1.
                            N = can not be used as a ATP command set on NSSC-1.
                            blank = not applicable."
        FORM
            NAME         "INS"
            LABEL        "NATP"
        END_FORM
    END_FIELD
 
 

    FIELD  instr_dur
        TYPE            I4
        DESCRIPTION     "This field holds the instruction duration, which is 
                        the duration of execution of the instruction. It can 
                        be a default instruction duration from the PDB for a 
                        primitive instruction. It can be an expected or 
                        computed duration for a top level or compound 
                        instruction. For a command set, this field contains 
                        the total duration of the command set."
        UNITS           "MILLISECONDS"
        FORM
            NAME         "INS"
            LABEL        "DEFAULT DURATION(ms.)"
        END_FORM            
    END_FIELD
 
 

    FIELD  instr_dur2
        TYPE            I4
        DESCRIPTION     "This field contains the duration of the last command 
                        in the command sets. It is only used for command sets. 
                        It is taken from the PDB for a PDB-defined command set.
                        It can also be an expected or computed duration for a 
                        temporary command set."
        UNITS           "MILLISECONDS"
        FORM
            NAME         "INS"
            LABEL        "LAST COMPONENT DURATION"
        END_FORM
    END_FIELD
 
 

    FIELD  instr_cpri
        TYPE            I2
        DESCRIPTION     "This field holds the instruction cache priority. It 
                        is used to determine which instructions will be removed
                        from the Expander's internal cache when the cache fills
                        up. Priorities of user-defined instructions range from
                        0 (remove first) to 99 (keep longest). An instruction 
                        with a priority of 0 will not be saved in the cache
                        file at the end of SMS generation. PDB-defined commands
                        have priority 100."
        FORM
            NAME         "INS"
            LABEL        "CACHE PRIORITY"
        END_FORM
        RANGE            "0..100"
    END_FIELD
 
 

    FIELD  instr_valid
        TYPE            C3
        DESCRIPTION     "This field holds the validation flag. It indicates 
                        whether the instruction has been validated. Following 
                        are valid values for this field:
                             VAL = valid passed validation
                             FVA = failed parameter validation 
                          blanks = validation not attempted

                        The Expander will not expand an instruction unless
                        the instruction has passed validation."
        FORM
            NAME         "INS"
            LABEL        "VALIDATION"
        END_FORM
        DISCRETE        " ",  "FVA",  "VAL"
    END_FIELD
 
 

    FIELD  update_date
        TYPE TIME_STAMP_TYPE
        DESCRIPTION     "This field is the date of last update of the 
                        instruction. It is used by the database manager to 
                        aid in housekeeping."
    END_FIELD
 
 

    FIELD  clp_name
        TYPE            C72
        DESCRIPTION     "This field holds the CLP file name if the instruction 
                        was loaded into the database using the CLP. This field 
                        is used as an aid for tracing a file to the 
                        database. This field is blank for primitive
                        instructions."
        FORM
            NAME         "INS"
            LABEL        "LIST PROCESSOR FILE NAME"
        END_FORM
    END_FIELD
 
 

    FIELD  pdb_tape_id
        TYPE PDB_ID_TYPE
        DESCRIPTION     "This field is the ID of the PDB tape which is used 
                        to validate this instruction. If the instruction is 
                        a PDB defined primitive, this field is the ID of the 
                        PDB tape from which this instruction was loaded. 
                        For non-primitive instructions, INSTRUCT/VALIDATE 
                        will set this field to the current PDB tape in use."
        FORM
            NAME         "INS"
            LABEL        "PDB TAPE ID"
        END_FORM
    END_FIELD
 
 

    FIELD  label_flag
        TYPE YES_NO_FLAG_TYPE
        DESCRIPTION     "This field is the data block label flag. It is only
                        used for PDB-defined data blocks. This field indicates 
                        whether this instruction should have a data block label
                        in the SMS. It has the following values:
                            Y  = generate a label
                            N  = leave label blank
                         blank = generate a label"
    END_FIELD
 
 
END_RECORD
 
 
!------------------------------------------------------------------------------
!
!   RELATION DECLARATION
!
!------------------------------------------------------------------------------
 
 
RELATION  qginstruct
 
    TYPE             QGIN_TYPE
 
    DESCRIPTION      "General Instruction Description Relation"
 
    SUBSYSTEM_USING  "SPSS", "SCS", "IM"
    FORM
        NAME         "INS"
    END_FORM
   
    RELATED_FIELDS  "qgformat.*" "qgtableparm.*"

 
    INDEX  qginstruct_1
        TYPE         unique, clustered
        FIELDS       instr_name
    END_INDEX
 
END_RELATION
 
!------------------------------------------------------------------------------
!
!   INSTANCE DECLARATION
!
!------------------------------------------------------------------------------
 
 
INSTANCE  qginstruct
 
    GLOBAL
 
    TYPE        QGIN_TYPE
 
END_INSTANCE

Go to the top.