I have a situation in which I want to quickly (and invisibly) connect to Progress and output a long character string to a text file. I wrote a succinct little program that can find the record and output the character string to the text file. The record is found based on the value of a single column. The program expects to receive an input parameter, LookupKey.
I have been trying the following command with no luck:
C:\dlc\wrk> ..\bin\mbpro -db databasename -p myprogram.p "123456" -N tcp -H dbHost -S 5005
myprogram.p
DEF input parameter LookupKey AS CHAR.
DEF VAR sOutFile AS CHAR NO-UNDO.
sOutFile = "CredRpt_Key_" + LookupKey + ".txt".
OUTPUT TO value(sOutFile).
FOR EACH CredReport WHERE CredReport.tblKey = LookupKey NO-LOCK:
PUT UNFORMATTED CredReport.RptText SKIP.
END.
OUTPUT CLOSE.
How can I send an input parameter to a program file executed via mbpro?
I have been trying the following command with no luck:
C:\dlc\wrk> ..\bin\mbpro -db databasename -p myprogram.p "123456" -N tcp -H dbHost -S 5005
myprogram.p
DEF input parameter LookupKey AS CHAR.
DEF VAR sOutFile AS CHAR NO-UNDO.
sOutFile = "CredRpt_Key_" + LookupKey + ".txt".
OUTPUT TO value(sOutFile).
FOR EACH CredReport WHERE CredReport.tblKey = LookupKey NO-LOCK:
PUT UNFORMATTED CredReport.RptText SKIP.
END.
OUTPUT CLOSE.
How can I send an input parameter to a program file executed via mbpro?