Logo
Back

◆ Flex Solutions

Automatic unwrap of Unisys IC containers
This FLEX script is used internally to automatically unwrap all files in a Unisys IC container directly to DISK, as an alternative to a manual unwrap and using the SIMPLEINSTALL utility.

The simplest way to install an IC is to overload the current files and H/L - MCP, COMS, and NETWORKING ICs either require or prefer a H/L as it is often easier to avoid problems with in-use files and active libraries.

The script is held in a JOBSYMBOL file called UNWRAP and uses FLEX's parameterised DO file capability:

PARAMETER(CONTAINER)
WFL REMOVE UNWRAP/JOB
SELECT #A EQL 0 OR #B EQL 0
REP HEAD "BEGIN JOB UNWRAP;FAMILY DISK=DISK ONLY;"
 REP IF #A LSS 1 THEN                                          \
        #A.STORE(IF USER="ICXFER" THEN 4 ELSE 3) &             \
        $DIR.STORE(DECAT(TITLE,#("/",FILEID(TITLE,#A),"/"),4)) \
     ELSE                                                      \
         EMPTY,                                                \
     IF TITLE EQW "(=)###/MCP/#=/SYSTEM/=/MCP" THEN            \
        #($EMODE.STORE(DECAT(TITLE,"SYSTEM/",1)),              \
        $MCP.STORE("*SYSTEM/"&FILEID(TITLE,1)&"/"&$EMODE&"/"&  \
                   FILEID(TITLE,1)&"_IC"&FILEID(TITLE,3)) &    \
        #B.STORE(1))                                           \
     ELSE                                                      \
         EMPTY,
REP FOOT "UNWRAP ",$DIR,"/= AS *= OUTOF UNISYS/",#CONTAINER#,  \
       " FROM DEV(PACK) ",/,                                   \
       " TO DISK(RESTRICTED=FALSE);",/,                        \
       IF $MCP NEQ EMPTY THEN                                  \
       "CHANGE *SYSTEM/"&$EMODE&" TO "&$MCP&" FROM DISK;"      \
    ELSE                                                       \
           EMPTY, /,                                           \
      "END JOB"
FILES (*)= IN UNISYS/#CONTAINER#:FILE UNWRAP/JOB
WFL STARTJOB UNWRAP/JOB

The above extract is a FLEX DO file that creates a WFL job to unwrap all the files in a container direct to DISK, stripping off the usercode (such as ICXFER) and release information prefix to unwrap files under the '*' directory.

The FLEX DO file can be downloaded (as a container) from here.

If the container holds a new MCP codefile, the unwrapped MCP codefile will then be changed to a name with the IC level built into the file title. This means that the MCP will have a meaningful name constructed with the IC level in the title. For example, in MCP 49.1 IC 120 , the file:

*SYSTEM/DELTA/MCP

will be changed to:

*SYSTEM/491/DELTA/MCP/491_IC120

This script can be readily changed to accommodate a site-specific MCP codefile title.

Running the script:

1. Transfer the new Unisys IC to a directory on the mainframe called 'UNISYS' (this can easily be changed in the FILES specification in the script.
2. Execute the script:

U FLEX DO UNWRAP("MCPDEL.CON")
Can we backup KEYEDIO files which also have a FILEKIND of DBDATA?
By default, FLEX will not backup DMSII DBDATA files, can we backup KEYEDIO files which also have a FILEKIND of DBDATA.?It is possible to set them apart - KEYEDIO files have a FILEORGANIZATION of KEYEDIO whereas DBDATA has FILEORGANIZATION set to NOTRESTRICTED.Can FLEX be forced to backup KEYEDIO files only?

Flex does not consider any files that have a filekind of DBDATA and will not discriminate between DMSII and KEYEDIOII. However, there is a Flex config variable you can set which will force Familymanager to include DBDATA and DBRESTARTSET file. The variable is called 'FLEX_BACKUPDB' and can be changed using the INSTALL utility via the CONFIG->FLEX menu.  If this variable is non-empty (typically 'TRUE' would be used), it is then possible to set up a FLEX DONTBACKUP rule to exclude the DMSII-specific files e.g.:

	DONTBACKUP "DMSII files":    FILEKIND={DBDATA,DBRESTARTSET} AND FILEORGANIZATION NEQ KEYEDIO;


How can I determine if a file has been created in the last hour

The following Flex SELECT will capture all files created in the past hour at the time the script is run:

	 	SEL (DAYS(TODAY,CREATEDAY)*86400+    	(TIMEOFDAY-CREATIONTIME)) LEQ 3600
In particular, if the script is run between 00:00 and 00:59 in the morning the SELECT will detect files that were created in the time range 23:00 to 23:59, including the specific condition for a file created on December 31st. The DAYS function allows the SELECT to compare two Julian dates, automatically handling the New Year changeover. The number of days is multiplied by 86400, the number of seconds in a day (24x3600).
Is there a HOSTNAME attribute available in Flex

To get the system HOSTNAME in a FLEX OPAL script, use the construct:

	SYSTEM(HOSTNAME)

Unlike SUPERVISOR, there is no HOSTNAME attribute.

What is the difference between Flex, Flex/2, Flex/3 and Full Flex

The Metalogic FLEX package consists of a single utility called OBJECT/FLEX with an array of examples files.

The FLEX/3 package is meant for sites running Unisys cataloging features to allow the backup of disk files to a variety of media including tape, CD, CD image and disk farms. Two additional utilities with OBJECT/FLEX called FAMILYMANAGER and MERGETAPE handle the creation of backups and the merging of media with expired or deleted files.

The FLEX/2 package has been defunct for many years and is now not marketed by Metalogic.