Sample UFO Export / Import Functions to move from one system to another
search cancel

Sample UFO Export / Import Functions to move from one system to another

book

Article ID: 240956

calendar_today

Updated On:

Products

UFO

Issue/Introduction

As things have changed with the operating system and installation of UFO over the years we have a need to Export the files from one system to another system. Is there a correct methodology for this process?

Environment

UFO r3.2

z/OS any level

Resolution

UFO Export Import Function

There are two methods you can use to copy UFO items from one system to another. 

  • IOXMAINT can be used to backup and restore files. This can be used to backup from one system and restore to a different system effectively copy UFO items from one system to another.  This utility is explained in the UFO Reference Manual: Utilities
  • OXEXPORT and OXIMPORT batch utilities can be used to copy items from one system to another. The user can select the items they want to copy.  These utilities are explained in UFO Support Package User Guide.  This is the method explained below.

 

Discover the IOX datasets in use in CICS

In the CICS for both Production and Test environments issue the UFOINIT transaction. 

  • Enter SE to check for a CNTRLPW value. If it is present, capture the value and use on the PASSWORD= control cards.  If no value is found then the PASSWORD= cards are not required.  PF7 to return to the UFOINIT main screen.
  • Enter PE to capture the dataspace names in use

 

UFOSPCE= UFOIOX            UFO system space name

USCSPCE= USRIOX            User component space name

USFSPCE= USRIOX            User file space name    

 

One of these dataspace names is what you will use for the LIBRARY= or TARGET= card in the examples below.

Below is a summary of the UFO Support Package User Guide section 5 The Export/Import Utilities.  Please see the document if you need further clarification.

The OPTION= statements determine how or if items will be unloaded.

OPTION= REMOTE/LOCAL/LISTONLY determines the primary action the routine will take.

  • LISTONLY option will not generate output to be imported into another system. It lists the items that will be selected based on the remaining control cards.
  • LOCAL option is the Default but is not recommended. See the chapter listed above if you want more information.
  • REMOTE option can be used even when both the target and source UFO systems are on the same LPAR and must be used if the UFO systems are on different LPARS. This is our recommended approach.  See details farther down the document.

 

OPTION=MERGE/PURGE

  • MERGE option indicates the source object will merge with the target object if it already exists. Default
  • PURGE option indicates if the object already exists on the target, it will be deleted and replaced with the object from the source.

 

OPTION=CREATE/NOCREATE

  • CREATE option indicates if the target IOX dataset does not exist it will be created
  • NOCREATE option indicates if the IOX dataset does not exist and error will be generated. Default

 

Action cards are used to tell OXEXPORT what objects and possibly dependent objects to unload.  The cards are in the form action=//////// where each slash represents all characters (wildcard).  The slashes as shown will select all objects of type action

Discovering what objects need to be transferred to another system is largely up to the client.  We will provide suggestions on how to discover the items to transfer. 

First is using the OPTION=LISTONLY until all the necessary objects have been discovered.  This will prevent any unnecessary transfers and possible problems.

If you know the ACB or Procedure name you can start here as follows:

OPTION=LISTONLY 
LIBRARY=xxxIOX  
PASSWORD=pppppppp
ACB=name

The LIBRARY= needs to point to the IOX file where the application is stored in UFO. 

PASSWORD= is the password found above.

Where name is the ACB (Application) name.   If the ACB is found, the ACB information will be output along with any DDS, DDX, PDS, DSD, and FLV found related to the ACB.  The output may look something like:

UTL3019I Currently exporting ACB UFOEDD         
UTL3009I DDX UFOEDD will be exported with UFOEDD
UTL3009I PDS UFOEDD will be exported with UFOEDD
UTL3008I PDS UFOEDD is continued on UFOED01     
UTL3008I PDS UFOED01 is continued on UFOED02    
UTL3008I PDS UFOED02 is continued on UFOED03    
UTL3009I DDS UFOEDD will be exported with UFOEDD
UTL3002I ACB UFOEDD was successfully exported        

If the ACB is not found by name, use the following control cards to determine if the PDS (Procedure) exists and if it belongs to an ACB.

OPTION=LISTONLY 
LIBRARY=xxxIOX  
PASSWORD=pppppppp
ACB=////////
PDS=name

Where name is the Procedure name.  Browse the job output.  Find the name.  If it appears in the ACB output, capture the ACB name.  if not, make sure it shows in the PDS output.
You can run with these commands set to all wildcards and look for matching records or you can attempt something like aaa/////  where aaa is the prefix of the ACB or PDS names.
There are two different sets of action cards to use depending if an ACB exists or not.  Please use the appropriate set of action cards.                     

ACB Exists

Exporting the ACB will export many of the components associated with the ACB but not all of them.  You will have to run other action commands or use online displays to locate the other pieces of the application.  Add the remaining action cards to look for your other objects.  Most application have a similar prefix to identify them as associated.

ACB=name
PANEL=////////
VIEW=////////
HELP=////////
MENU=////////
RUN=////////

 No ACB found

 Knowing the procedure name (PDS) is a good start and may help with finding the other pieces of the application.  Add the remaining action cards to look for your other objects.  Most application have a similar prefix to identify them as associated but this is not a guarantee.

PDS=name 
DDS=//////// 
DDX=//////// 
DSD=//////// 
HELP=////////
MENU=////////
PANEL=////////
RUN=//////// 
VIEW=////////

Once you have identified all the components you wish to copy to a different UFO file (IOX) you can build the final set of control cards for the copy.  For example:

OPTION=REMOTE    
              OPTION=         MERGE/PURGE – choose your option and supply one word
              OPTION=         CREATE/NOCREATE - choose your option and supply one word
LIBRARY=nnnIOX   
PASSWORD=pppppppp
TARGET=xxxIOX    
ACB=TEST     
HELP=TST/////    
MENU=TST/////    
PANEL=TST/////   
RUN=TST/////     
VIEW=TST/////

You may be able to use partial statements as above or you may have to use spelled out statements for all the parts.  I.E. Multiple HELP= or PANEL= statements to select explicitly what is needed for transfer.
Notice the OPTION statements.  See the earlier comments about which values to set. 
This option requires a dataset (SYSPCH) to hold the exported data and will be used as input in the OXIMPORT job step.  
Supply the SYSPCH DD card with a file defined as RECFM=F,LRECL=80,BLKSIZE=80
See the JCL examples below for help in setting up your own JCL.  

Please note no job card or other standard JCL supplied.    

LISTONLY JCL

//*------------------------------------------------------------------*
//*                                                                   
//STEP1    EXEC PGM=OXEXPORT                                          
//STEPLIB  DD  DISP=SHR,DSN=hlq.UFO.LOADLIB                           
//USRIOXI  DD DISP=SHR,DSN=hlq.USRIOX.INDEX                           
//USRIOXR  DD DISP=SHR,DSN=hlq.USRIOX.REPOS                           
//SYSPRINT DD SYSOUT=*                                                
//SYSLST   DD SYSOUT=*                                                
//* -----------------------------------------------------------------
//* ACB=  produces DDS, DDX, PDS, DSD, FLV                            
//* DDS=  produces all the DDS and continuation screens               
//* DSD=  the DSD and any FLV entries                                 
//* PDS=  includes all forms continuations by default                 
//* -----------------------------------------------------------------
//SYSIN    DD *                                                       
OPTION=LISTONLY                                                       
LIBRARY=USRIOX                                                         
PASSWORD=********   

If ACB name is known:                                                 

ACB=name                                                          
HELP=////////                                                         
MENU=////////                                                         
PANEL=////////                                                        
RUN=////////                                                           
VIEW=////////  

If PDS (procedure) name is known:

PDS=name 
DDS=//////// 
DDX=//////// 
DSD=//////// 
HELP=////////
MENU=////////
PANEL=////////
RUN=//////// 
VIEW=////////   

/*                                                                    
//*------------------------------------------------------------------*
//                                                          

REMOTE JCL

//*------------------------------------------------------------------*
//* This JCL will unload objects from DD USRIOX to DD SYSPCH for     *
//* use by the IMPORT job step.                                      *
//*------------------------------------------------------------------*
//*                                                                  
//DELETE   EXEC PGM=IEFBR14                                          
//SYSPCH   DD DISP=(OLD,DELETE),DSN=hlq.SYSPCH                       
//*                                                                   
//CREATE   EXEC PGM=IEFBR14                                          
//SYSPCH   DD DISP=(NEW,CATLG,DELETE),DSN=hlq.SYSPCH,                
//            SPACE=(CYL,(n,n)),VOLSER=,                             
//            DCB=(RECFM=F,LRECL=80,BLKSIZE=80)    <==No Modifications
//*                                                                  
//EXPORT   EXEC PGM=OXEXPORT                                         
//STEPLIB  DD  DISP=SHR,DSN=hlq.UFO.LOADLIB                           
//USRIOXI  DD DISP=SHR,DSN=hlq.USRIOX.INDEX                          
//USRIOXR  DD DISP=SHR,DSN=hlq.USRIOX.REPOS                          
//SYSPCH   DD DISP=OLD,DSN=hlq.SYSPCH                                
//SYSPRINT DD SYSOUT=*                                                
//SYSLST   DD SYSOUT=*                                               
//* -----------------------------------------------------------------
//* ACB=  produces DDS, DDX, PDS, DSD, FLV                           
//* DDS=  produces all the DDS and continuation screens              
//* DSD=  the DSD and any FLV entries                                
//* PDS=  includes all forms continuations by default                
//* -----------------------------------------------------------------
//SYSIN    DD *                                                      
OPTION=REMOTE                                                         
OPTION=NOCREATE                                                      
OPTION=PURGE                                                          
LIBRARY=USRIOX                                                       
PASSWORD=********                                                    
TARGET=USRIOX             

If ACB name is known:                                                 

ACB=name                                                          
HELP=////////                                                         
MENU=////////                                                         
PANEL=////////                                                        
RUN=////////                                                          
VIEW=////////        

If PDS (procedure) name is known:

PDS=name 
DDS=//////// 
DDX=//////// 
DSD=//////// 
HELP=////////
MENU=////////
PANEL=////////
RUN=//////// 
VIEW=////////     

/*                                                                   
//*------------------------------------------------------------------*
//* As written this job will run on the same machine as the Export   *
//* If the new IOX data set is located on a different CPU, you will  *
//* need to adjust this JCL to ensure the step runs on the           *
//* different CPU.                                                   *
//*                                                                  *
//* The same DD names and datasets names assumes this is being run   *                                                   
//* on a different LPAR than the export job.                         *
//*                                                                  *
//* Be VERY careful here.  You do not want to write over a           *
//* production data set                                              *
//*------------------------------------------------------------------*
//*                                                                  
//IMPORT   EXEC PGM=OXIMPORT                                          
//STEPLIB  DD  DISP=SHR,DSN=hlq.UFO.LOADLIB                          
//USRIOXI  DD DISP=SHR,DSN=hlq.USRIOX.INDEX                          
//USRIOXR  DD DISP=SHR,DSN=hlq.USRIOX.REPOS                          
//SYSPRINT DD SYSOUT=*                                               
//SYSLST   DD SYSOUT=*                                               
//SYSIN    DD DISP=OLD,DSN=hlq.SYSPCH                                
//