Start of change CICS VSAM Transparency for z/OS, Version 1.2


Inserting multiple columns

About this task

Assume that you want to split the 35-byte field ITEM-DESCRIPTION shown in Figure 1, into two columns of 4 bytes and 31 bytes. The procedure is as follows:

Procedure

  1. Delete the fields ITEM-DESCRIPTION and its redefining field ITEM-DETAILS-1 using the action code D. This is explained in Deleting a column. After confirming the deletes, you are returned to the edit columns screen.
  2. Insert the first new field using the action code I. CICS® VT calculates the length of the field that is available and displays this as the length in the Insert column screen, shown in Figure 1.
    Figure 1. CICS VT: Insert column
     
     --------------------------- CICS VT: Insert column --------------------------
    Command ===> ________________________________________________ Scroll ===> CSR 
                                                                                  
     Enter new field and column attributes:-                                      
                                                                                  
     Copybook field:                                                              
       position       ==> 49___                                                   
       length         ==> 35__                                                    
       data type      ==> _      (C,P,U,F,H,B)                                    
                                                                                  
     Column:                                                                      
       name           ==> .................................................. +    
       length         ==> _____    Optional (if DEC specify x,y)                  
       data type      ==> ____     (CHAR,DEC,INT,SINT,BINT,DATE,TIME,TIMS)             
                                                                                  
     Mapping:                                                                     
       picture / FBE  ==> _________________  (example  HH.XX.SS.NNNNNN)           
                                                     (or MMDDYY)                  
                                                     (or EXITx=exit name)         
       parameters     ==> __________________________  Optional user parameters    
                                                                                  
    Press: Enter to confirm   PF3 to exit   PF1 for help                          
    
  3. Enter the new column name and attributes. Note that when you specify column type of CHAR, the Column Length field defaults to the value of the field length. In this example, you want to split ITEM-DESCRIPTION into two columns of 4 bytes and 31 bytes. The attributes of the first new column to be inserted are shown in Figure 2:
    Figure 2. CICS VT: Insert column
     
      --------------------------- CICS VT: Insert column --------------------------
     Command ===> ________________________________________________ Scroll ===> CSR 
                                                                                   
      Enter new field and column attributes:-                                      
                                                                                   
      Copybook field:                                                              
        position       ==> 49___                                                   
        length         ==> 4 __                                                    
        data type      ==> C      (C,P,U,F,H,B)                                    
                                                                                   
      Column:                                                                      
        name           ==> ITEM_DESC_SHORT................................... +    
        length         ==> _____    Optional (if DEC specify x,y)                  
        data type      ==> CHAR     (CHAR,DEC,INT,SINT,BINT,DATE,TIME,TIMS)             
                                                                                   
      Mapping:                                                                     
        picture / FBE  ==> _________________  (example  HH.XX.SS.NNNNNN)           
                                                      (or MMDDYY)                  
                                                      (or EXITx=exit name)         
        parameters     ==> __________________________  Optional user parameters    
                                                                                   
     Press: Enter to confirm   PF3 to exit   PF1 for help   
                            
  4. Press Enter when you have supplied the column details. After the new column is inserted, you are returned to the Edit columns screen.
  5. Insert the second column using the action code I. CICS VT calculates the field position and the available field length and displays them in the Insert column screen as shown in Figure 3.
    Figure 3. CICS VT: Insert column
     
     --------------------------- CICS VT: Insert column --------------------------
    Command ===> ________________________________________________ Scroll ===> CSR 
                                                                                  
     Enter new field and column attributes:-                                      
                                                                                  
     Copybook field:                                                              
       position       ==> 53___                                                   
       length         ==> 31__                                                    
       data type      ==> _      (C,P,U,F,H,B)                                    
                                                                                  
     Column:                                                                      
       name           ==> .................................................. +    
       length         ==> _____    Optional (if DEC specify x,y)                  
       data type      ==> ____     (CHAR,DEC,INT,SINT,BINT,TIME,TIMS)             
                                                                                  
     Mapping:                                                                     
       picture / FBE  ==> _________________  (example  HH.XX.SS.NNNNNN)           
                                                     (or MMDDYY)                  
                                                     (or EXITx=exit name)         
       parameters     ==> __________________________  Optional user parameters    
                                                                                  
    Press: Enter to confirm   PF3 to exit   PF1 for help   
                           
  6. Supply the attributes of the next new column and press Enter. For example, you could specify a column called ITEM_DESC_LONG that is 31 bytes in length, with column type CHAR. When the new column is inserted, you are returned to the Edit columns screen.
  7. Confirm that the Edit columns screen contains your new columns. In the example, ITEM_DESC_SHORT and ITEM_DESC_LONG would display in the Edit columns screen:
     
     --------------------- CICS VT: Edit columns in VIDKSDS2 ------- Row 1 from 11 
    Command ===> ________________________________________________ Scroll ===> CSR  
                                                                                   
    Commands: MAP  SAVE  PREVIEW  SUSPEND/RESUME  CHANGE/UNDO  SHOW                
    Actions:  S Display, U Update, D Delete, I Insert            Status message /  
    A Pos   Copybook field name / DB2 column name     Type Len   Exit      Pic Par 
    - ----- ----+----1----+----2----+----3----+----   ---- ----- ----------------- 
    _ 1     ITEM-NUMBER                             +      6                       
            ITEM_NUMBER...................          + CHAR 6                       
    _ 7     ITEM-NAME                               +      12                      
            ITEM_NAME.....................          + CHAR 12                      
    _ 19    ITEM-COLOUR                             +      6                       
            ITEM_COLOUR...................          + CHAR 6                       
    _ 25    ITEM-HEIGHT                             +      4                       
            ITEM_HEIGHT...................          + CHAR 4                       
    _ 29    ITEM-COST                               +      4                       
            ITEM_COST.....................          +  DEC 7,2                     
    _ 33    ITEM-REORDER-QUANTITY                   +      3                       
            ITEM_REORDER_QUANTITY.........          +  DEC 3,0                     
    _ 36    ITEM-SUPPLIER-CODE                      +      3                       
            ITEM_SUPPLIER_CODE............          + CHAR 3                       
    _ 39    ITEM_DATE_FIRST_SHIPPED                 +      8                       
            ITEM_DATE_FIRST_SHIPPED.......          + DATE                   Y     
    _ 47    ITEM-SHELF-LIFE                         +      2                       
            ITEM_SHELF_LIFE...............          + CHAR 2                       
    _ 49    ITEM_DESC_SHORT                         +      4                       
            ITEM_DESC_SHORT...............          + CHAR 4                       
    _ 53    ITEM_DESC_LONG                          +      31                      
            ITEM_DESC_LONG................          + CHAR 31                      
    


Task topic


Last updated: December 6, 2013 20:43:11

Task Task

Feedback


Timestamp icon Last updated: Friday, 6 December 2013


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///topics/cvtug_insert_multiple_columns.html
End of change