Data Transfer Examples

This section does not describe the functionality and parameters of the functions Unload and Load. This information is given in the sections Unload and Load. Instead, this section tells you how to proceed step by step and indicates some special considerations or restrictions that apply to the individual steps.

The examples given here are for the Migrate Load and Unload functions, but the information given applies in most cases equally to ALF Import and Export functions. Any differences in behavior are described as required.

This section covers the following topics:


Unload

This section first describes the unload procedure in general and then gives two detailed examples: one unload operation performed online and one in batch mode.

Step 1 - Create Extract

Create one or more extracts which contain the objects to be unloaded. Before starting the unload operation, please consider the following points:

  • It is not possible to select fields to be included in an extract. All fields of a file contained in an extract are exported automatically.

  • If you select userviews, you must also select the related master files if they do not exist in the target environment.

  • With IMS files and databases, you must always select the entire IMS structure.

  • All objects that are referenced by objects contained in an extract but are not contained in the extract are stored in the target environment as placeholder objects.

  • If Predict Security is active, you must have at least READ access to objects you wish to export.

  • Metadata, retrieval models and XRef data cannot be included in an extract. You can specify them directly with the Unload function.

  • After an extract has been created online, you have the option to select the objects in batch mode using the command BUILD.

Step 2 - Execute the Unload Function

Execute the Unload function under consideration of the following points:

  • You have to decide whether the Internal ID of objects is to be used. If not, set the parameter with internal ID to N. The concept of the Internal ID and examples of unload operations with or without Internal ID are given in the section Internal ID.

  • If you wish to unload metadata and objects, you are recommended to perform this unload operation in two steps. First, unload the metadata, and then unload the objects to another transfer medium. This saves time when you load the data at a later time.

After the Unload function has been executed, the source FDIC file contains a protocol in an object of type report listing.

Example of an Online Unload Operation

In this example, all objects of an FDIC file are unloaded.

  1. Call Predict
    Call Predict with the commands LOGON SYSDIC and MENU.

  2. Create an extract
    Create an extract with the command ADD ET ALL-OBJECTS.

  3. Select all objects
    Select all objects with the command BUILD ET ALL-OBJECTS. Do not specify an object type in the screen below.

        13:57:37             *****  P R E D I C T  *****              2013-05-31
        Plan  14                - Build/extend an Extract -              Profile SYSTEM
       
        Extract ID ......... ALL-OBJECTS
                                                              Added 2013-05-31 at 13:57
                                                                 by SYSTEM
        Build extract for object type ..*
       
      
    

    In the next screen, specify the parameters as follows:

        13:58:29             *****  P R E D I C T  *****              2013-05-31
        Plan  14                - Build/extend an Extract -              Profile SYSTEM
       
        Extract ID ......... ALL-OBJECTS
                                                              Added 2013-05-31 at 13:57
                                                                 by SYSTEM
        Build extract for object type ..*     ( All objects )
       
        Retrieval type .....* D
        Output-mode ........* L List
       
        Search criteria
          Object ID .........
       
       
       
       
        Drop existing objects N (Y,N)
        List objects ........ N (Y,N)
       
        Restrictions .......* E empty
        Output options .....* D Profile Default
       
      
    

    The following window appears:

       +--------- Status of Processing --------+
       !                                       !
       ! Current time ............... 13:01:31 !
       ! No. of objects processed ... 99       !
       ! Resulting no. of objects ... 0        !
       !                                       !
       ! Continue processing .......*          !
       +---------------------------------------+
      
    

    Enter U in the field Continue processing.

  4. Unload the objects
    Enter the command SYSDICBE to change to the Coordinator. The following parameters are specified in the Coordinator Main Menu:

    • Set Function to U.

    • Set Transfer medium type to 1. This is the default setting which is used in this example.

    • Set To FDIC DBnr to 46 and To FDIC Fnr to 13. (Default setting is the current FDIC file.)

  5. Specify additional parameters
    In the next screen, specify the parameters as follows:

        13:42:18             *****  P R E D I C T  *****              2017-05-31
                                    - Unload Extracts -
       
       
          Extract ID *                     No.    Extract ID *                     No.
        1 ALL-OBJECTS                           6
        2                                       7
        3                                       8
        4                                       9
        5                                      10
       
       
        Unload options                         Build set for unloading             No.
          With code ..............* N            Metadata ................ N (Y/N)
          With profile ............ N (Y/N)      Retrieval models ........ N (Y/N)
          With internal ID ........ Y (Y/N)      XRef data ............... N (Y/N)
          Include Extracts ........ N (Y/N)
          Target environment .....* 84
          Create Report listing ... Y (Y/N)
       
       
        Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
               -     -    Stop   -     -    Flip  Print  -     -     -     -     -
      
    
  6. Unload successfully terminated
    The source FDIC file contains a protocol in an object of type report listing. The ID of this object is consists of your user ID, the function code UNL and a timestamp. This protocol lists the objects that have been unloaded.

Example of an Unload Operation in Batch Mode

In this example, all objects of an FDIC file are unloaded.

  1. Call Predict (online)
    Call Predict with the commands LOGON SYSDIC and MENU.

  2. Create an extract (online)
    Create an Extract with the command ADD ET ALL-OBJECTS.

  3. Start the unload process
    Start the batch job with the following commands:

       LOGON SYSDIC
       MENU
       BUILD EXTRACT ALL-OBJECTS LIST ALL             (select all objects)
       SYSDICBE                                       (change to Coordinator)
       SET MEDIUM-TYPE=5 FDIC-DBNR=46 FDIC-FNR=13     (optional)
       UNLOAD EXTRACT EXTRACT1=ALL-OBJECTS CODE=Y PROFILE=Y
       FIN
      
    
  4. Unload successfully terminated
    The source FDIC file contains a protocol in an object of type report listing.

Load

This section first describes the load procedure in general and then gives two detailed examples: one performed online and one performed in batch mode.

Before You Begin

Check whether an FDIC file has been defined as the Coordinator FDIC with parameters Coordinator FDIC DBnr/Fnr under Defaults > Coordinator Defaults. If this is not the case, define the Coordinator FDIC by specifying these parameters.

General Information

To start a load operation, you do not necessarily have to use the function Load, which first performs various checks and then transfers the data to the Main FDIC. You can instead execute the function Test. This command performs the same checks as the function Load but does not transfer the data.

If another load operation is in process when you start a load, the Coordinator FDIC is locked. If the Coordinator FDIC is locked by your own user ID, i.e. the load operation was started by you, you can unlock and clear the Coordinator FDIC with the command CLEAR.

If the Coordinator FDIC is locked by a load operation started by another user, you may have to contact this user and/or wait until the load is completed. If this load was interrupted, it may be necessary to clear the Coordinator FDIC. This can be done by your DB Administrator with the command SPECIAL REFRESH. See Refresh Coordinator FDIC in the section Special Functions in the Predict Administration documentation.

Note:
With both commands CLEAR and SPECIAL REFRESH, all the data on the Coordinator FDIC is deleted.

Overview of Load Phases

The following table shows the actions which are performed by the Coordinator, and the functions/commands you can use to execute the various actions. Each action is described below. See also section Coordinator Check Cycle in this documentation.

 

Transfer to
Coord. FDIC

Coordinator Check Cycle

Transfer to
Main FDIC

Conflict
Management

Security  

Consistency
Check

LOAD ---------> ---------> ---------> ---------> ----------
TEST ---------> ---------> ---------> ----------  
CONTINUE   ---------> ---------> ---------> ----------
CHECK   ---------> ---------> ----------  

Report Listing
stored in

Coordinator
FDIC

Coordinator
FDIC

Coordinator
FDIC

Coordinator
FDIC

Main FDIC
  • Transfer to Coordinator FDIC
    The syntax of the ALF/Migrate file to be transferred is checked. If no error is detected, the data is transferred to the Coordinator FDIC. If the ALF/Migrate file was created by you and an error occurred, you must correct the file and reexecute the operation.

  • Conflict Management - First Phase of the Coordinator Check Cycle
    The Coordinator checks whether there are conflicts resulting from Internal IDs. In case of a conflict, the operation is cancelled. After you solved the conflicts, continue by executing the command

    • CHECK if the data is to be checked only and not to be transferred, or

    • CONTINUE if the data is to be checked and transferred.

  • Security - Second Phase of the Coordinator Check Cycle
    The Coordinator checks whether you have the appropriate access rights to load the data. If there are objects for which you do not have the required access rights, the operation is cancelled. After you have either obtained the necessary access rights or deleted the corresponding objects on the Coordinator FDIC, continue by executing the command

    • CHECK if the data is to be checked only and not to be transferred, or

    • CONTINUE if the data is to be checked and transferred.

  • Consistency Check - Third Phase of the Coordinator Check Cycle
    The data is checked for logical consistency (for example, uniqueness of file number with file objects). If inconsistencies are detected, the operation is cancelled. After resolving the consistency conflicts on the Coordinator FDIC, continue by executing the command

    • CHECK if the data is to be checked only and not to be transferred, or

    • CONTINUE if the data is to be checked and transferred.

  • Transfer to Main FDIC
    All objects are transferred from the Coordinator FDIC to the Main FDIC. Then the contents of the Coordinator FDIC are deleted. After successful execution of the load operation, the report listing containing the protocol can be found on the Main FDIC. It contains the list of the objects loaded. If the Coordinator cancelled the load because of errors, the report listing can be found on the Coordinator FDIC.

Example of an Online Load Operation

In this example, the workfile used contains two objects: the program PROG-1 and the system SY-1. The program PROG-1 is to be imported.

  1. Call the Predict Coordinator
    LOGON SYSDICBE 
    MENU
  2. Specify the load parameters
    The following parameters are specified in the Coordinator Main Menu:

    • Set Function to L.

    • Set Transfer medium type to 1. This is the default setting which is used in this example.

    • Set To FDIC DBnr to 46 and To FDIC Fnr to 13. (Default setting is the current FDIC file.)

    • Set Object type to PR. All objects of this type are loaded.

  3. Coordinator FDIC is locked by another import
    Another import is running and locks the Coordinator FDIC. A window appears which contains information about the import in process:

        13:59:43             *****  P R E D I C T  *****             2013-05-31
                                      - Coordinator -
        Migrate Function                     ALF Function
          +------------------------------------------------------------------------+
        U !                                                                        !
        L !                         Coordinator FDIC locked                        !
        T !                  -----------------------------------                   !
        D !                                                                        !
        B ! Attention: User PRDUNDA  TID LOADDOC  for main FDIC 46  , 13           !
          !            has given command                                           !
        F !            Load All objects                                            !
          !            on 2013-05-31 at 13:59:06                                   !
        T !                                                                        !
          ! Status: Transfer main FDIC started at 13:59:11                         !
          !                                                                        !
          !                                                                        !
          +------------------------------------------------------------------------+
          Cipher ...........              Cipher ....             Cipher ....
          Identification ..*
       
        Command ===>
        Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--
               -     -    Stop   -     -    Flip  Print  -     -     -     -     -
      
    

    If the current load operation was started by you, you can clear the Coordinator FDIC with the command CLEAR 46 13. Otherwise, you must wait until the current load operation is terminated. Start the load operation again as described under point 2, Specify the load parameters.

  4. Specify additional load parameters
    In the following screen, additional load parameters are specified. In this example, only new objects of type program are to be imported:

    • Set Replace to N. This is the default setting.

    • Start the load by pressing ENTER.

        13:38:19             *****  P R E D I C T  *****             2013-05-31
                                  - Load (PR) Program -
       
         Program ID ....................
       
         Load options
           Program of type ............*
           From date ................... 0000-00-00 00:00 (YYYY-MM-DD HH:II)
           Prefix ......................
           Suffix ......................
           Create Report listing ....... Y (Y/N)
       
       
           Replace ..................... N (Y/N)
       
      
    
  5. Conflict resulting from Internal ID
    The following window appears:

       +---------------- Attention -----------------------+
       !                                                  !
       ! Function not successfully terminated.            !
       !                                                  !
       !     Error during CONFLICT MANAGEMENT             !
       !                                                  !
       ! ENTER 'Y'  to go to                              !
       !            Coordinator FDIC (180,62)             !
       !            of Main FDIC     ( 46,13)     ... 
    Y
    
       !
       !                                                  !
       ! Enter any other value to go to Coordinator Menu  !
       +--------------------------------------------------+
      
    

    Enter Y to change to the Coordinator FDIC.

  6. Display the report listing
    Enter the command DISPLAY RT #SAG-ERROR to display the report listing which contains the list of errors. The report listing provides the following information:

               CHECKING OBJECTTYPE: PR , OBJECT-ID: PROG-1
       DIC1635 OBJECT WITH THIS OBJECT ID, BUT DIFF. INTERNAL ID EXISTS.
       DIC1628 CHECKED WITH ERRORS PR PROG-1.
      
    
  7. Resolve the conflict
    • Rename object PROG-1 to PROG-2.

    • Enter the command SYSDICBE to return to the Coordinator.

    • Enter the command CONTINUE to continue the import that was interrupted.

  8. Error in Check Consistency phase
    The following window appears:

       +---------------- Attention -----------------------+
       !                                                  !
       ! Function not successfully terminated.            !
       !                                                  !
       !     Error during CHECK CONSISTENCY               !
       !                                                  !
       ! ENTER 'Y'  to go to                              !
       !            Coordinator FDIC (180,62)             !
       !            of Main FDIC     ( 46,13)     ... 
    Y
    
       !
       !                                                  !
       ! Enter any other value to go to Coordinator Menu  !
       +--------------------------------------------------+
      
    

    Enter Y to change to the Coordinator FDIC.

  9. Display the report listing:
    Enter the command DISPLAY RT #SAG-ERROR to display the report listing which contains the list of errors. The Report Listing provides the following information:

               CHECKING OBJECTTYPE: PR , OBJECT-ID: PROG-1
       DIC2851 MEMBER ALREADY DOCUMENTED IN SYSTEM PROGRAM : PROG-1
               PROGRAM PROG-1 IS ON THE MAIN FDIC.
       DIC1628 CHECKED WITH ERRORS PR PROG-2.
      
    
  10. Resolve the consistency conflict:
    One way to resolve the conflict is:

    • Enter command BACK to change to Main FDIC (target FDIC).

    • Delete or change the member name in the program PROG-1.

    • Enter command SYSDICBE to return to the Coordinator.

    • Enter command CONTINUE to continue the load operation.

    Another way to resolve the conflict is:

    • Delete or change the member name in the program PROG-2.

    • Enter command SYSDICBE to return to the Coordinator.

    • Enter command CONTINUE to continue the load operation.

  11. Load operation terminated successfully
    • Enter command SYSDIC to change to Main FDIC (target FDIC).

    • Select the report listing containing the protocol with the command SELECT RT name. The name of the report listing is built from your user ID followed by the string 'IMP' and a time stamp. See the section Logging Coordinator Functions.

    • Display the report listing.

Example of a Load Operation in Batch Mode

In this example, a data set exists which contains two objects: program PROG-1 and the System SY-1. The program PROG-1 is to be loaded.

  1. Start the load operation
    In the following job, the data set containing the object to be loaded must be assigned to workfile 5.

       LOGON SYSDICBE
       MENU
       SET MEDIUM-TYPE=5 FDIC-DBNR=46 FDIC-FNR=13             (optional)
       LOAD OBJECTTYPE PR REPLACE=N
       FIN
      
    
  2. Coordinator FDIC is locked by another load operation
    The job is cancelled and provides the following output:

       +-----------------------------------------------------------------------------+
       !                                                                             !
       !                         Coordinator FDIC locked                             !
       !                      ------------------------------                         !
       !                                                                             !
       !                                                                             !
       !                                                                             !
       ! Attention: User ULH      TID DAESA048 for main FDIC  46 ,  13               !
       !            has given command                                                !
       !            Import All objects                                               !
       !            on 2013-05-31 at 08:36:02                                        !
       !                                                                             !
       !                                                                             !
       !    Status: Transfer main FDIC started at 08:36:06                           !
       +-----------------------------------------------------------------------------+
      
    

    If the load in process was started by you, you can clear the Coordinator FDIC with the command CLEAR 46 13. Otherwise, you must wait until the current load operation is terminated. Start the job again as described under point 1, Start the load operation.

  3. Conflict resulting from Internal ID
    The job is cancelled and provides the following output:

               CHECKING OBJECTTYPE: PR , OBJECT-ID: PROG-1
       DIC1635 OBJECT WITH THIS OBJECT ID, BUT DIFF. INTERNAL ID EXISTS.
       DIC1628 CHECKED WITH ERRORS PR PROG-1.
      
    
  4. Resolve the conflict online
    • Call Predict with the commands LOGON SYSDIC and MENU.

    • Enter the command COORDINATOR to change to the Coordinator FDIC.

    • Rename object PROG-1 to PROG-2.

  5. Continue the load operation
    You do not need to specify a workfile for the job started with the following commands.

       LOGON SYSDICBE
       MENU
       SET FDIC-DBNR=46 FDIC-FNR=13            (optional)
       CONTINUE
       FIN
      
    
  6. Error in Check Consistency phase
    The job is cancelled and provides the following output:

                     CHECKING OBJECTTYPE: PR , OBJECT-ID: PROG-1
       DIC2851       MEMBER ALREADY DOCUMENTED IN SYSTEM PROGRAM : PROG-1
                     PROGRAM PROG-1 IS ON THE MAIN FDIC.
       DIC1628       CHECKED WITH ERRORS PR PROG-2.
      
    
  7. Resolve the consistency conflict online
    Call Predict with the commands LOGON SYSDIC and MENU. One way to resolve the conflict is:

    • Delete or change the member name in the program PROG-1.

    Another way to resolve the conflict is:

    • Enter the command COORDINATOR to change to the Coordinator FDIC.

    • Delete or change the member name in the program PROG-2.

    Continue the load operation as described under point 5, Continue the load operation.

  8. Load terminated successfully
    The load protocol is provided in the job output and in the Report Listing on the Main FDIC (target FDIC). To display the Report Listing, see point 11 of the online example (Load operation terminated successfully).

Consolidating Internal IDs in Batch Mode

If you are working with more than one FDIC file, we strongly recommend you consolidate the Internal IDs of the objects at your site.

Sample Batch Syntax for Consolidating Internal IDs

Consolidating Internal IDs can be done either in a two-step process or in one single step. Both methods are described below.

Start of instruction setTo consolidate Internal IDs in two steps:

  1. Unload the Internal IDs from the FDIC to a Workfile

    Enter the following command:

       LOGON SYSDICBE
       MENU
       SET dbnr1 fnr1 MEDIUM-TYPE=1
       UNLINTERNAL
       FIN
    

    where dbnr1 and fnr1 represent the database and file number of the FDIC.

  2. Load the Internal IDs to the Current FDIC

    Enter the following command:

       LOGON SYSDICBE
       MENU
       SET dbnr2 fnr2 MEDIUM-TYPE=1
       LOAD INTERNAL-ID ALL UPDATE=Y
       FIN
    

    where dbnr2 and fnr2 represent the database and file number of the FDIC to be converted.

Start of instruction setTo consolidate Internal IDs in one step:

  1. Unload the Internal IDs from the FDIC to a Workfile and Load the Internal IDs to the Current FDIC

  2. Enter the following command:

       LOGON SYSDICBE
       MENU
       SET fnr1 dbnr1 MEDIUM-TYPE=1
       UNLINTERNAL
       SET fnr2 dbnr2
       LOAD INTERNALID ALL UPDATE=Y
       FIN
    

    where

    dbnr1 and fnr1 represent the file and database number of the source FDIC,

    and

    dbnr2 and fnr2 represent the file and database number of the target FDIC.