[Stackoverflow] [Progress OpenEdge ABL] Reading file compare with table and need output

Status
Not open for further replies.
A

a.omz

Guest
Hi can someone please help me with something. Sorry I am new to this.

I have a file "dntData", with 9 numbers in a column. 6 are numbers in a database table, 3 are made up numbers.

All i want to do is for the program to read the input, look for the numbers in the table and return whether those numbers exist in the table or not.

For some reason, my program only returns numbers that it can find and nothing for the ones it cant - which is not useful to my purpose. i need an output to tell me "number not found" along with the number that was looked for.

This is the code i wrote:

Code:
def stream inputStream.
def stream outStream.

def var dntData           as char extent 1 no-undo.

def var vl-CIN# as integer.

def var vl-error as char.
def var vl-match as char.


input stream inputStream from "/home/xxx/xxx/xxx/xxx/FirstInput.csv".

output stream outStream to "/home/xxx/xxx/xxx/xxx/FirstOutput.csv".

export stream outStream delimiter "'" "CustomerID" "Match" "Error".
 
Repeat:   
   
    assign
    dntData = "".
        
    import stream inputStream delimiter "'" dntData.

    assign
    vl-CIN# = integer(dntnData[1]).

 
   

   find first members where cin# = vl-CIN#.
       
           if not available(members) then
             assign
               vl-error = "Could Not Find".
           if available(members) then
             assign
                vl-match = "Account Exists".
 

    

export stream outStream delimiter "'" vl-CIN# vl-match vl-error.

Continue reading...
 
Status
Not open for further replies.
Top