ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Multiformat Logical file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiformat Logical file

    QQ Why do we use Multiformat Logical File?
    QQ Can we update multiformat logical file.
    QQ Clearly differentiate between join logical file and multiformat local file?

  • #2
    Re: Multiformat Logical file

    Refer to

    Regards,
    KR

    Comment


    • #3
      Re: Multiformat Logical file

      mutiple record formt logical files will display all the records from the physicals used in that logical file.

      where as join logical files display only matched records from one primary file to secondary file. at max join logical file can contain primary file records only.

      Comment


      • #4
        Re: Multiformat Logical file

        getting this screen
        Attached Files

        Comment


        • #5
          Re: Multiformat Logical file

          Plz give a practical example for multiformat file .Thanks in advance

          Comment


          • #6
            Re: Multiformat Logical file

            School's in.......Please read the documentation and try the examples. You will learn more from that than just asking the question here.
            Bill
            "A good friend will bail you out of jail,
            A true friend would be sitting beside you saying,
            'Wow, that was fun.'"

            Comment


            • #7
              Re: Multiformat Logical file

              Here is an example of a multiformat logical file.
              I will assume you know something about EDI.

              So I want to connect our data to the Mapping in EDI for an out bound file.

              The process creates records in the X12O864H01 to X12O864H07 physical files and similar for D01...D07.

              The multifomat logical file;
              PHP Code:
              X12O864H07
              A
              Record format and key for Header 1 file              
              A          R H01864FM                  PFILE
              (X12O864H01)
              A                                                       
              A          K OH01TPID                                   
              A          K OH01TMSTP                                  
                                                                      
              A
              Record format and key for Header 2 file              
              A          R H02864FM                  PFILE
              (X12O864H02)
              A                                                       
              A          K OH02TPID                                   
              A          K OH02TMSTP                                  
              A          K OH02SEQ
              #                                   
                                                                      
              ARecord format and key for Header 3 file              
              A          R H03864FM                  PFILE
              (X12O864H03)
              A                                                       
              A          K OH03TPID                                   
              A          K OH03TMSTP                                  
              A          K OH03SEQ
              #                                   
                                                                      
              ARecord format and key for Header 4 file              
              A          R H04864FM                  PFILE
              (X12O864H04)
              A                                                       
              A          K OH04TPID                                   
              A          K OH04TMSTP                                  
              A          K OH04SEQ
              #                                   
                                                                      
              ARecord format and key for Header 5 file              
              A          R H05864FM                  PFILE
              (X12O864H05)
              A                                                       
              A          K OH05TPID                                   
              A          K OH05TMSTP                                  
              A          K OH05SEQ
              #                                   
                                                                      
              ARecord format and key for Header 6 file              
              A          R H06864FM                  PFILE
              (X12O864H06)
              A                                                       
              A          K OH06TPID                                   
              A          K OH06TMSTP                                  
              A          K OH06SEQ
              #                                   
                                                                      
              ARecord format and key for Header 7 file              
              A          R H07864FM                  PFILE
              (X12O864H07)
              A                                                       
              A          K OH07TPID                                   
              A          K OH07TMSTP                                  
              A          K OH07SEQ
              #                                   
              A                                                       
              A
              Record format and key for Detail 1 file              
              A          R D01864FM                  PFILE
              (X12O864D01)
              A                                                       
              A          K OD01TPID                                   
              A          K OD01TMSTP                                  
              A          K OD01SEQ
              #                                   
                                                                      
              ARecord format and key for Detail 2 file              
              A          R D02864FM                  PFILE
              (X12O864D02)
              A                                                       
              A          K OD02TPID                                   
              A          K OD02TMSTP                                  
              A          K OD02SEQ
              #                                   
                                                                      
              ARecord format and key for Detail 3 file              
              A          R D03864FM                  PFILE
              (X12O864D03)
              A                                                       
              A          K OD03TPID                                   
              A          K OD03TMSTP                                  
              A          K OD03SEQ
              #                                   
                                                                      
              ARecord format and key for Detail 4 file              
              A          R D04864FM                  PFILE
              (X12O864D04)
              A                                                       
              A          K OD04TPID                                   
              A          K OD04TMSTP                                  
              A          K OD04SEQ
              #                                   
                                                                      
              ARecord format and key for Detail 5 file              
              A          R D05864FM                  PFILE
              (X12O864D05)
              A                                                       
              A          K OD05TPID                                   
              A          K OD05TMSTP                                  
              A          K OD05SEQ
              #                                   
                                                                      
              ARecord format and key for Detail 6 file              
              A          R D06864FM                  PFILE
              (X12O864D06)
              A                                                       
              A          K OD06TPID                                   
              A          K OD06TMSTP                                  
              A          K OD06SEQ
              #                                   
                                                                      
              ARecord format and key for Detail 7 file              
              A          R D07864FM                  PFILE
              (X12O864D07)
              A                                                       
              A          K OD07TPID                                   
              A          K OD07TMSTP                                  
              A          K OD07SEQ

              So the file is then used to tie all the physical files to the EDI mapping. So now when the MF file is read, its all in the correct order that is needed.

              I'm sure this is clear as mud.
              Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

              Comment


              • #8
                Re: Multiformat Logical file

                Surbhi

                Multi format logical file can be updated normally.
                However for addition there are a bit tricks.. find here

                http://publib.boulder.ibm.com/infoce...rbafoformt.htm

                its usage is not so popular..

                This may be helpful regarding your topic :->

                In some circumstances, it is better to use multiple logical files, rather than to use a multiple-format logical file. For example, when keyed access is used with a multiple-format logical file, it is possible to experience poor performance if one of the files has very few records. Even though there are multiple formats, the logical file has only one index, with entries from each physical file. Depending on the kind of processing being done by the application program (for example, using RPG SETLL and READE with a key to process the small file), the system might have to search all index entries in order to find an entry from the small file. If the index has many entries, searching the index might take a long time, depending on the number of keys from each file and the sequence of keys in the index. (If the small file has no records, performance is not affected, because the system can take a fast path and avoid searching the index.)

                Comment


                • #9
                  Re: Multiformat Logical file

                  We can update the multi format logical file
                  However for addition there is a tricks...
                  http://publib.boulder.ibm.com/infoce...rbafoformt.htm

                  Helpful note:
                  In certain circumstances, it is better to use multiple logical files, rather than
                  to use a multiple-format logical file. For example, when keyed access is used
                  with a multiple-format logical file, it is possible to experience poor
                  performance if one of the files has very few records. Even though there are
                  multiple formats, the logical file has only one index, with entries from each
                  physical file. Depending on the kind of processing being done by the
                  application program (for example, using RPG SETLL and READE with a key
                  to process the small file), the system might have to search all index entries
                  in order to find an entry from the small file. If the index has many entries,
                  searching the index might take a long time, depending on the number of
                  keys from each file and the sequence of keys in the index. (If the small file
                  has no records, performance is not affected, because the system can take a
                  fast path and avoid searching the index.)

                  Comment


                  • #10
                    Re: Multiformat Logical file

                    I didn't think Heaven was that close to Hong Kong ?
                    Greg Craill: "Life's hard - Get a helmet !!"

                    Comment

                    Working...
                    X