Actually you are right, it was (and wasn't a coding error)

What happened is this, once I split the program into two and did an
external sort.  What used to be the output phase was the portion that
was accruing the 800K I/O trying to update the 181 extracted records
(segments).

I went back to what I had done a few weeks ago and the timings there
were fine.  But were bad running now. 

However I fixed the issue by changing how the Top most (parent) segment
was read from DLI.

The DLI Statement which was working a few weeks ago (the SSN and Agency
both make up the top level segment key)

    EXEC DLI GU USING PCB(2)                                    
        SEGMENT         (OS0201)                                
            WHERE       (OS201NSS=DW-SSN AND                    
                         OS201NAP=DW-AGENCY)                    
            FIELDLENGTH (9,5)                                   
            INTO        (OSPS-AGCY-PAY-SEG)                     
            SEGLENGTH   (LENGTH OF OSPS-AGCY-PAY-SEG)           
    END-EXEC.                                                   

Something changed however as it is now serially searching the OS0201
segments for a match, instead of recognizing the two fields being part
of the key and doing a keyed read.

I changed the logic to this and it fixed the Output program right up. 

     MOVE DW-SSN    TO AP-NMBR-SOC-SECR-SG                      
     MOVE DW-AGENCY TO AP-NMBR-AGCY-PAY-SG                      
*                      GET PARENT SEGMENT                       
     EXEC DLI GU USING PCB(2)                                   
         SEGMENT         (OS0201)                               
             WHERE       (OS201APK=AP-CODE-AGCY-PAY-KEY-SG)     
             FIELDLENGTH (14)                                   
             INTO        (OSPS-AGCY-PAY-SEG)                    
             SEGLENGTH   (LENGTH OF OSPS-AGCY-PAY-SEG)          
     END-EXEC.                                                  

At this point going to leave the program split into the extract/external
sort/update pieces.  As to why the first form was working a few weeks
ago, and isn't now, I'm not too clear on that. 

Thanks for all your input and suggestions on it.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Rich Tabor
Sent: Tuesday, March 27, 2007 2:17 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: Cobol Internal sort and DLI Databases

Sorry - I have to believe this is a coding error.  My guess is that
many of the 60000 segments were re-read after every success selection
(RELEASE) because the logic in the input procedure probably started
retrieving over at the beginning of the database.  Post the code.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to