Page 1 of 1

File Manager - variable group within the record

PostPosted: Tue Mar 30, 2010 6:12 pm
by bgrossnickle
I have a variable length record that has a variable length customer name and address area within the record. There a length indicator that specifies the length of the customer N&A area. Hoping to set up a template that would look for a length indicator at a certain position and applying it to the next X num of bytes. This variable area is at the end of the record, but I am sure one day we will have to add data after it.



     03 CIRMSTR-VARB-LEN                                         
                             PIC S9(04)          COMP.           
*                            VARIABLE LENGTH OF N/A DATA         
*                                                               
*****************************************************************
*    THE FOLLOWING VARIABLE AREA CONTAINS THE NAME, ADDRESS,    *
*    AND CITY/STATE LINES - FROM ONE TO SIX LINES.              *
*    FORMAT FOR THIS AREA IS:                                   *
*       LINE LENGTH BYTE - BINARY - X'00' TO X'29'              *
*                          DECIMAL - 0 TO 41                    *
*                          LINE LENGTH NOT INCLUDING THIS BYTE  *
*       LINE CODE BYTE   - 1 = NAME LINE                        *
*                          2 = ADDRESS LINE                     *
*                          3 = CITY/STATE LINE                  *
*       LINE DATA        - ONE TO 40 CHARACTERS                 *
*    MINIMUM DATA IS SIX BYTES - ALL LENGTHS X'00'              *
*    MAXIMUM DATA IS 252 BYTES - ALL SIX LINES 40 CHARACTERS    *
*                                PLUS THE LENGTHS AND CODES     *
*    CUSTOMER NAME   IS      LOG MAINT CODE = 0001              *
*    CUSTOMER NAME 2 IS      LOG MAINT CODE = 0065              *
*    CUSTOMER NAME 3 IS      LOG MAINT CODE = 0066              *
*    ADDRESS  LINE 1 IS      LOG MAINT CODE = 0004              *
*    ADDRESS  LINE 2 IS      LOG MAINT CODE = 0005              *
*    CITY/STATE LINE IS      LOG MAINT CODE = 0006              *
*****************************************************************
*                                                               
     03 CIRMSTR-NAME-ADDR                                       
                             PIC X(252).                         
*                            NAME/ADDRESS                       
*                                                               
     03 CIRMSTR-VARB-NAME-ADDR                                   
                         REDEFINES CIRMSTR-NAME-ADDR             
                         PIC X(01)    OCCURS 252 TIMES           
                         INDEXED BY   X-CIRMSTR-VARB-NAME.       
*                                                               
   03 CIRMSTR-NAME-ADDR-LINES                             
                       REDEFINES CIRMSTR-NAME-ADDR.       
      05 CIRMSTR-TITLE-LINE-LEN                           
                           PIC X(01).                     
      05 CIRMSTR-TITLE-LINE-TYPE                           
                           PIC X(01).                     
      05 CIRMSTR-TITLE                                     
                           PIC X(40).                     
      05 CIRMSTR-TITLE-LINE-2-LEN                         
                           PIC X(01).                     
      05 CIRMSTR-TITLE-LINE-2-TYPE                         
                           PIC X(01).                     
      05 CIRMSTR-TITLE-LINE-2                             
                           PIC X(40).                     
      05 CIRMSTR-TITLE-LINE-3-LEN                         
                           PIC X(01).                     
      05 CIRMSTR-TITLE-LINE-3-TYPE                         
                           PIC X(01).                     
      05 CIRMSTR-TITLE-LINE-3                             
                           PIC X(40).                     
      05 CIRMSTR-ADDRESS-LINE-1-LEN                       
                           PIC X(01).                     
      05 CIRMSTR-ADDRESS-LINE-1-TYPE                       
                           PIC X(01).                     
      05 CIRMSTR-ADDRESS-LINE-1                           
                           PIC X(40).                     
      05 CIRMSTR-ADDRESS-LINE-2-LEN                       
                           PIC X(01).                     
      05 CIRMSTR-ADDRESS-LINE-2-TYPE                       
                           PIC X(01).                     
      05 CIRMSTR-ADDRESS-LINE-2                           
                           PIC X(40).                     
      05 CIRMSTR-CITY-AND-STATE-LEN                       
                           PIC X(01).                     
      05 CIRMSTR-CITY-AND-STATE-TYPE                       
                           PIC X(01).                     
      05 CIRMSTR-CITY-AND-STATE                           
                           PIC X(40).                     
                                                           
    03 CIRMSTR-EW-NAME-ADDR                           
                        REDEFINES CIRMSTR-NAME-ADDR.   
       05 CIRMSTR-EW-TITLE-AND-ADDRESS.               
          07 CIRMSTR-EW-TITLE.                         
             09 CIRMSTR-EW-TITLE-1                     
                            PIC X(40).                 
             09 CIRMSTR-EW-TITLE-2                     
                            PIC X(40).                 
             09 CIRMSTR-EW-TITLE-3                     
                            PIC X(40).                 
          07 CIRMSTR-EW-ADDRESS.                       
             09 CIRMSTR-EW-ADDRESS-1                   
                            PIC X(40).                 
             09 CIRMSTR-EW-ADDRESS-2                   
                            PIC X(40).                 
          07 CIRMSTR-EW-CITY-AND-STATE                 
                            PIC X(40).                 
       05 CIRMSTR-EW-FILLER-2                         
                            PIC X(12).                 
                                                       

Re: File Manager - variable group within the record

PostPosted: Wed Mar 31, 2010 12:15 am
by dick scherrer
Hello and welcome to the forum,

I don't understand the question. . . :?

Re: File Manager - variable group within the record

PostPosted: Wed Mar 31, 2010 5:23 pm
by bgrossnickle
I will give it another try. It is a question about IBM File Manager (FM). It is a tool for viewing, updating and sorting mainframe files. I want to create a FM template for my customer file so that I can use the SINGL view to see the field name from within FM.

My file has a variable length customer name/address (NA) area. So the first 1500 bytes (or so) of the file have a standard record layout. Then the next area is the customer NA. Right before the NA is a NA-length. If it =0 then there is no NA information and we are at end of record. If the NA-length = 10, then we have ten bytes of customer NA and then end of record. I want the template to include the customer NA layout.

For now, the customer NA area is at the end of the record. But soon we will have to had additional fields and the NA will be followed by other non-NA fields, say a 50 byte collateral record. So if the NA-Length = 0, then we have 50 bytes until end of record. If the NA-length = 20, then we have 70 bytes until end of record.

I want to create a File Manager template.

Re: File Manager - variable group within the record

PostPosted: Thu Apr 01, 2010 12:58 am
by dick scherrer
Hello,

I don't have File Manager available. In FileAid, there is the capability to simply name a "copybook" and the data is shown using the copybook. Does File Manager not have the same capability?