Reading sequential files in COBOL vs SQL - IBM AS400

This is a discussion on Reading sequential files in COBOL vs SQL - IBM AS400 ; Hi everyone, I'm writing an OPM COBOL program that needs to process a large number of sequential files (around 4,000 records). It's a parsing algorithm that needs to find a few records at an unpredictable location in the file. Obviously ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Reading sequential files in COBOL vs SQL

  1. Reading sequential files in COBOL vs SQL

    Hi everyone,

    I'm writing an OPM COBOL program that needs to process a large number
    of sequential files (around 4,000 records). It's a parsing algorithm
    that needs to find a few records at an unpredictable location in the
    file. Obviously in COBOL I'd having to allow for reading a high
    percentage of the records in each of the files.

    Alternativey I could embed the SQL.code inside of the COBOL.

    Which would be faster? Is the answer obvious or should I test it both
    ways. Would the relative speed depend on other factors, ie size of
    computer, memory, hard disk and OS400 version? The program will be run
    on many different machines.

    Thanks

    Elliot


  2. Re: Reading sequential files in COBOL vs SQL

    On Aug 30, 11:54 am, Elliot wrote:
    > Hi everyone,
    >
    > I'm writing an OPM COBOL program that needs to process a large number
    > of sequential files (around 4,000 records). It's a parsing algorithm
    > that needs to find a few records at an unpredictable location in the
    > file. Obviously in COBOL I'd having to allow for reading a high
    > percentage of the records in each of the files.
    >
    > Alternativey I could embed the SQL.code inside of the COBOL.
    >
    > Which would be faster? Is the answer obvious or should I test it both
    > ways. Would the relative speed depend on other factors, ie size of
    > computer, memory, hard disk and OS400 version? The program will be run
    > on many different machines.
    >
    > Thanks
    >
    > Elliot


    Thanks to everyone who helped with this. I went with the SQL and it
    does seem fast enough which is what counts.

    I apologize for the repeated posting of the initial question. For some
    reason I did not see this posting in the "Topic Summary" view which is
    my default view. It only appears when I click on "Topic Listing". I
    had thought that it just wasn't getting through.

    Elliot


+ Reply to Thread