Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

C functions in cobol

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

  • C functions in cobol

    Is there a reason for not using the CMPPFM command? Dave

  • #2
    C functions in cobol

    We are working on performance improvement and as the file is involved with comparing some 10 lac record, I dont think there will be any considerable improvement in the time taken. That is the reason why we didn't try CMPPFM. Correct me if iam wrong.

    Comment


    • #3
      C functions in cobol

      Don't know. I have never benchmarked the performance of CMPPFM compared to other means. Using an HLL like COBOL would tend to be slower but not necessarily. Using an LLL like C would tend to be quicker, but again, not necessarily. Using the OVRDBF command to sequentially block records would certainly improve performance no matter which method you used. The code behind CMPPFM is very likely low level, and may actually result in performance improvement depending on how it is used. You will have to benchmark the process yourself to determine the most efficient method for your purposes. Dave

      Comment


      • #4
        C functions in cobol

        Recent experiments indicate that calling the C functions may not help much here. Don't know why yet. Coding the whole compare in C would probably show some benefit. Blocking is the biggest consideration. Assuming that there are no keyed reads in the program, the file will be buffered anyway but you can increase the buffering through the OVRDBF command. A google search for COBOL performance AS400 or similar may find more. I'm afraid I lost my COBOL performance presentations some years ago. P.S. SEQONLY(*YES) is ringing a bell somewhere in the back of my head too. Can't recall why.

        Comment


        • #5
          C functions in cobol

          Assuming equal level of knowledge in C and COBOL (a BIG assumption and one that will need to be evaluated on a shop by shop basis), I would not anticipate any significant difference -- in this type of application -- based on the high level language used. Both languages (and many others for that matter) will funnel through a common set of data management routines and it is this common set of routines that will primarily drive the performance of the application. Both C and COBOL have the ability to specify record blocking, avoidance of move mode processing, etc so they should be utilizing equivalent i5/OS capability. There will be minor runtime oriented differences in accessing these common i5/OS routines, but not anything worth worrying about. I would not recommend a re-write of the application from COBOL to C unless you suspect the COBOL program is poorly written and you have stronger skills using the C language. I suspect you will be disappointed with the result given the level of effort to re-implement. Again though, this assumes equivalent skills in the two languages. And while not asked, I would consider (unless you took out a microscope) RPG to be in the same performance area. There are a few things COBOL and C can specify that RPG cannot, but these will not add any significant difference to overall runtime of the application (when compared to the data management routines). CL, on the other hand, would not be a good implementation language (unless the CL application was implemented using CMPPFM that is :-) ). Bruce Vining - who has quite a bit of experience in all of these languages and their implementation

          Comment


          • #6
            C functions in cobol

            CMPPFM has a restriction on the file size. AS we have files with some million records, CMPPFM will fail stating that the file size is too large to compare. Any ways thanks for your valuable inputs. Thanks & regards, Vijay Sai M.

            Comment


            • #7
              C functions in cobol

              I have a requirement to improve the performance of a program. The program reads a file sequentially and compares the record with another file and if it finds any difference, then it populates a work file. As records are read sequentially, we decided to use 'C' functions so that set of records can be read in to a buffer using a single read in 'C'. Can any one provide me suggestions in this. Thanks and Regards, Vijay

              Comment


              • #8
                C functions in cobol

                October, 1993 News/400 magazine published a CMPF utility that could be modified to write differences to a work file--right now it just prints the differences. I use during Y2K for regressions testing and still use it occasionally. If is quite fast because it compares the whole record as a single field. Works by RRN or by a key field. The source may still be availabel on the iSeries News site. Sam

                Comment

                Working...
                X