Generating data


The Data Solutions Generator function allows you to fill fields with specified data. You can assign numeric and character fields with information sequentially, randomly, using pattern masking, or by picking valid values from another file.

This section gives you practice using Data Solutions to fill fields with data. This example inserts random numeric values from 1000 to 9000 in the EMP-LIFE-INS-WITHOLD-AMT field and pattern sequential values in the EMP-NUMBER field of the DASAMP.EMPLOYEE file.

Accessing data generation (Option 5)

The Data Generation function is located on Data Solutions Primary Option Menu as function number 5, as shown in the following figure.

File-AID/Data Solutions Primary Option Menu

 File-AID/Data Solutions 21.1  --- Primary Option Menu -------------------------
 OPTION ===> 5
                                                            
   0  Parameters     - Data Solutions Parameters             USERID   - USERID1
   1  Date Aging     - Date Aging Solutions                  DATE     - 20/12/09
   2  Euro Tools     - Currency Conversions                  TIME     - 08:39
   3  Data Analyzer  - Analysis Solutions                    TERMINAL - 3290A
   4  Translator     - Data Translator                       CCSID    - 00037
   5  Generation     - Data Generation Solutions
   6  Field Exits    - Formatted Field Exits
   7  Encryption     - Data Encryption
   8  Replace        - Data Replace
   D  Data Privacy   - Dynamic Privacy Rules
   U  Utilities      - Print and File Override Utilities
   S  Criteria Sets  - Create or modify Criteria sets
   R  XREF           - Create or change record layout cross reference
   T  Tutorial       - Display information about Data Solutions
   X  Exit           - Terminate Data Solutions and return to ISPF

      Product Update History: https://support.compuware.com/s/product-updates   
      Online Technical Support available at:  https://support.compuware.com     
      (c) Copyright 1997-2021 BMC Software, Inc.

From the Data Solutions Primary Option Menu, select Data Solutions option 5 to access the Data Generation Menu (Data Generation Menu).

Selecting generator (Option 5.1)

The Generator function is located on Data Generation Menu as option number 1, as shown in the below figure.

Data Generation Menu

File-AID/Data Solutions  Data Generation Menu ---------------------------------
OPTION ===> 1


  1  Generator          - Random, sequential and Mask Generation
  2  Pattern            - Pattern controlled data generation 

From the Data Generation Menu, select option 1 to access the Input Dataset Specification screen.

Defining your request

File-AID/Data Solutions displays the Input Dataset Specification screen, shown in the below figure. It captures:

  • Input Dataset
  • Record layout and XREF dataset information
  • Change Criteria usage (and optionally, Change criteria dataset and member name)

Input Dataset Specification screen

File-AID/Data Solutions - Input Dataset Specification -------------------------
COMMAND ===>

Specify Input Dataset Information:
  Dataset name           ===> DASAMP.EMPLOYEE
  Member name            ===>            (Blank or pattern for member list)
  Disposition            ===> OLD        (OLD or SHR)
  I/O exit name          ===>

Specify Record Layout Information:
  Record layout usage    ===> S          (S = Single; X = XREF)
  Record layout dataset  ===> DASAMP.LAYOUTS
  Member name            ===> EMPLOYEE   (Blank or pattern for member list)
  XREF dataset name      ===>
  Member name            ===>            (Blank or pattern for member list)  

Specify Criteria Information:
  Use existing criteria  ===> N          (Y = Yes; N = No)
  Criteria dataset name  ===>
  Member name            ===>            (Blank or pattern for member list)  

Specify Business Rules or Field Exits Dataset Information:
  Dataset name ===>
  1. Type DASAMP.EMPLOYEE in the Input Dataset name field.
  2. Specify S in the Record layout usage field.
  3. Type DASAMP.LAYOUTS in the Record layout dataset field.
  4. Type EMPLOYEE in the Member name field.
  5. Press <Enter>.

Specifying data generator criteria

File-AID/Data Solutions displays the Data Generator Criteria screen.

Data Generator Criteria Screen

Action  Sets  Display  Show  Options  Menu  Help
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Generator Criteria -----------------------
 COMMAND ===>                                                  SCROLL ===> PAGE
 TABLE DATASET ===>
 SET  1 OF  1           EMPLOYEE-MASTER-FILE                     GBL = N SEL = N
 ---- FIELD LEVEL/NAME ------- -FORMAT- RO --------- Parameters ---------------+
 ******************************* TOP OF DATA ***********************************
 5 EMP-NUMBER                    5/AN
 5 EMP-LAST-NAME                15/AN
 5 EMP-FIRST-NAME               10/AN
 5 EMP-MID-INIT                  1/AN
 5 FILLER                        2/AN
 5 EMP-TITLE                    30/AN
 5 EMP-PERSONAL-INFO SYNC       23/GRP
   10 EMP-NATL-ID-NUMBER         9/NUM
   10 FILLER                     1/AN
   10 EMP-DATE-OF-BIRTH          6/AN
   10 EMP-DOB-REDEF REDEFINES EMP-DATE-OF-BIRTH
   10 EMP-DOB-REDEF SYNC         6/GRP
     15 EMP-DOB-MM               2/NUM
     15 EMP-DOB-DD               2/NUM
 Valid RO: SE = Sequence, RA = Random, MA = Mask, TA = Table, EP, F
 Commands: SELect, View

Press <PF8> to scroll to the next topic.

File-AID/Data Solutions displays the next topic of the Data Generator Criteria screen, as shown in the following figure.

Data Generator Criteria Screen - Part 2

   Action  Sets  Display  Show  Options  Menu  Help
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Generator Criteria -----------------------
 COMMAND ===>                                                  SCROLL ===> PAGE
 TABLE DATASET ===>
 SET  1 OF  1           EMPLOYEE-MASTER-FILE                     GBL = N SEL = N
 ---- FIELD LEVEL/NAME ------- -FORMAT- RO --------- Parameters ---------------+
     15 EMP-DOB-YY               2/NUM
   10 EMP-HIRE-DATE              6/AN
   10 EMP-MARITAL-STATUS         1/AN
 5 EMP-WITHOLD-INFO SYNC        15/GRP
   10 EMP-LIFE-INS-WITHOLD-AMT   6/SNUM RA
   10 EMP-NATL-TAX-WITHOLD-PCT   3/PS
   10 EMP-REGION-TAX-WITHOLD-PCT
                                 3/PS
   10 EMP-LOCAL-TAX-WITHOLD-PCT
                                 3/PS
 5 EMP-HOME-ADDRESS SYNC        50/GRP
   10 EMP-STREET-ADDRESS        25/AN
   10 FILLER                     1/AN
   10 EMP-CITY                  15/AN
   10 EMP-STATE-PROV-CNTY SYNC   4/GRP
 Valid RO: SE = Sequence, RA = Random, MA = Mask, TA = Table, EP, F
 Commands: SELect, View
  1. Type RA in the RO column next to EMP-LIFE-INS-WITHOLD-AMT.
  2. Press <Enter>.

File-AID/Data Solutions displays the Field Random Criteria screen, as shown in the following figure.

Enter Field Random Criteria Screen

image2021-9-28_13-34-28.png

  1. Type 1000 in the From field.
  2. Type 9000 in the To field.
  3. Press <PF3> (END).

File-AID/Data Solutions redisplays the Data Generator Criteria screen with the random field data displayed next to the EMP-LIF-INS-WITHOLD-AMT field. See the following figure.

Data Generator Criteria Screen

   Action  Sets  Display  Show  Options  Menu  Help
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Generator Criteria -----------------------
 COMMAND ===>                                                  SCROLL ===> PAGE
 TABLE DATASET ===>
 SET  1 OF  1           EMPLOYEE-MASTER-FILE                     GBL = N SEL = N
 ---- FIELD LEVEL/NAME ------- -FORMAT- RO --------- Parameters ---------------+
     15 EMP-DOB-YY               2/NUM
   10 EMP-HIRE-DATE              6/AN
   10 EMP-MARITAL-STATUS         1/AN
 5 EMP-WITHOLD-INFO SYNC        15/GRP
   10 EMP-LIFE-INS-WITHOLD-AMT   6/SNUM RA FROM(1000);TO(9000);FLEN(00006)
   10 EMP-NATL-TAX-WITHOLD-PCT   3/PS
   10 EMP-REGION-TAX-WITHOLD-PCT
                                 3/PS
   10 EMP-LOCAL-TAX-WITHOLD-PCT
                                 3/PS
 5 EMP-HOME-ADDRESS SYNC        50/GRP
   10 EMP-STREET-ADDRESS        25/AN
   10 FILLER                     1/AN
   10 EMP-CITY                  15/AN
   10 EMP-STATE-PROV-CNTY SYNC   4/GRP
 Valid RO: SE = Sequence, RA = Random, MA = Mask, TA = Table, EP, F
 Commands: SELect, View

Press <PF3> (END).

Specifying pattern data generation criteria

File-AID/Data Solutions displays the Criteria Menu, as shown in the following figure. It shows that you have defined 1 criteria set for option 5.1. Next, select the PATTERN criteria option to specify data generation using a pattern.

Change Criteria Menu

 File-AID/Data Solutions ---------- Criteria Menu ---  -------------------------
 OPTION ===> 5.2
                                                               
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   0 fields      
     1   DATE AGING             - Aging criteria                  0 sets        
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets        
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets        
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        0 sets        
     5.1 GENERATOR              - Data Generator criteria         1 sets        
     5.2 PATTERN                - Pattern Data Generation         0 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets        
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets        
     8   REPLACE                - Data Replace Criteria           0 sets        
                                                                               
 Member list description ===> ______________________________                    
     Long    ===> ______________________________________________________________
 Description ===> ______________________________________________________________
                                                                               
 Commands: VIEW, SAVE, END, CANCEL, ENTER to continue
  1. Type 5.2 in the OPTION line in the Criteria Menu.
  2. Press <Enter>.

File-AID/Data Solutions displays the Pattern Data Criteria screen.

Pattern Data Criteria Screen

Action  Sets  Display  Show  Options  Menu  Help
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Pattern Data Criteria   -----------------------
 COMMAND ===>                                                  SCROLL ===> PAGE
 SET  2 OF  2           EMPLOYEE-MASTER-FILE                     GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- PARAMETERS ---------------+
 ******************************* TOP OF DATA ***********************************
 1 EMP-NUMBER                    5/AN   PS
                                     
 2 EMP-LAST-NAME                15/AN                                           
 3 EMP-FIRST-NAME               10/AN                                           
 4 EMP-MID-INIT                  1/AN                                           
 5 FILLER                        2/AN                                           
 6 EMP-TITLE                    30/AN                                           
 7 EMP-PERSONAL-INFO            23/GRP                                          
   8 EMP-NATL-ID-NUMBER          9/NUM                                          
   9 FILLER                      1/AN                                           
   10 EMP-DATE-OF-BIRTH          6/AN                                           
   11 EMP-DOB-REDEF REDEFINES EMP-DATE-OF-BIRTH                                 
   11 EMP-DOB-REDEF              6/GRP                                          
     12 EMP-DOB-MM               2/NUM                                          
     13 EMP-DOB-DD               2/NUM                                          
     14 EMP-DOB-YY               2/NUM                                          
 Valid RO: PR = Pattern Random, PS = Pattern Sequential, EP , FM                
 Commands: SELect, GBL, View
  1. Type PS in the RO column next to EMP-NUMBER to specify a sequential pattern.
  2. Press <Enter>.

File-AID/Data Solutions displays the Pattern for Sequential Data Generation screen, as shown in the following figure.

Remember, you might have to remap your keyboard to display and enter the square brackets correctly. For instructions, consult your Terminal Emulator software documentation.

Pattern for Sequential Data Generation Screen

image2021-9-28_13-38-7.png

  1. Type Y in the Unique values required field.
  2. Type 0 in the Percentage blank/zero field.
  3. Type A8-01 in the Initial value field.
  4. Type A(A-D)#(8,9)[-]##(1-9) in the Pattern field.

    Important

    If you are using a constant value like the [-] in this example, and have not remapped your keyboard to display and enter the square brackets correctly, you can copy the value from this screen. Copy the two characters before the ending semicolon from the end of the second line of the “Pattern syntax:” section as this will supply the hex value X’ADBD’ for however your keyboard is mapped. After copying this value, paste it into your “Pattern:” value and then insert your constant value between these two characters.

  5. Press <PF3> (END).

File-AID/Data Solutions

 redisplays the Pattern Data Criteria screen with the pattern sequential field data displayed next to the EMP-NUMBER field. See the following figure.

Pattern Data Criteria Screen with Pattern Sequential

Action  Sets  Display  Show  Options  Menu  Help
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Pattern Data Criteria   -----------------------
 COMMAND ===>                                                  SCROLL ===> PAGE
 SET  2 OF  2           EMPLOYEE-MASTER-FILE                     GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- PARAMETERS ---------------+
 ******************************* TOP OF DATA ***********************************
 1 EMP-NUMBER                    5/AN   PS INIT(A8-01);FLEN(00005);PCT(000);UNI+
 2 EMP-LAST-NAME                15/AN                                           
 3 EMP-FIRST-NAME               10/AN                                           
 4 EMP-MID-INIT                  1/AN                                           
 5 FILLER                        2/AN                                           
 6 EMP-TITLE                    30/AN                                           
 7 EMP-PERSONAL-INFO            23/GRP                                          
   8 EMP-NATL-ID-NUMBER          9/NUM                                          
   9 FILLER                      1/AN                                          
   10 EMP-DATE-OF-BIRTH          6/AN                                          
   11 EMP-DOB-REDEF REDEFINES EMP-DATE-OF-BIRTH                                
   11 EMP-DOB-REDEF              6/GRP                                          
     12 EMP-DOB-MM               2/NUM                                          
     13 EMP-DOB-DD               2/NUM                                          
     14 EMP-DOB-YY               2/NUM                                          
 Valid RO: PR = Pattern Random, PS = Pattern Sequential, EP , FM                
 Commands: SELect, GBL, View

Press <PF3> (END) to return to the Criteria Menu.

File-AID/Data Solutions displays the Criteria Menu, as shown in the following figure. It shows that you have defined 1 criteria set for option 5.1 and 1 for option 5.2. You may select another criteria option or press <Enter> to process the current criteria.

Change Criteria Menu

 File-AID/Data Solutions ---------- Criteria Menu ---  -------------------------
 OPTION ===>                                                                
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   0 fields      
     1   DATE AGING             - Aging criteria                  0 sets        
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets        
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets        
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        0 sets        
     5.1 GENERATOR              - Data Generator criteria         1 sets        
     5.2 PATTERN                - Pattern Data Generation         1 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets        
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets       
     8   REPLACE                - Data Replace Criteria           0 sets        
                                                                               
 Member list description ===> ______________________________                    
     Long    ===> ______________________________________________________________
 Description ===> ______________________________________________________________
                                                                               
 Commands: VIEW, SAVE, END, CANCEL, ENTER to continue

Press <Enter> to process.

Specifying output

File-AID/Data Solutions displays the Output Specification screen. For information on the screens related to specifying output, see Specifying Output.

Related topics

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*