input through break problem

laugue

New Member
Hello,

I have the following 4gl program :

Code:
DEFINE VARIABLE vnom       AS CHARACTER FORMAT "x(30)".
DEFINE VARIABLE vprenom   AS CHARACTER FORMAT "x(30)".
DEFINE VARIABLE vemail      AS CHARACTER FORMAT "x(30)".

DEFINE VARIABLE cmdunix    AS CHARACTER FORMAT "x(100)".


cmdunix = "sfLDAPGW.sh \"*\" \"mail sn givenname\" \""
         + "johndoe" + "\" | ldif2csv.sh".

input through value(cmdunix) no-echo.
set vnom vprenom vemail no-error.
input close.

display "toto"
  with frame a.
display vemail
  with frame b.
When the cmdunix command (shell script) return something, it is good and I can see "toto" and vemail value displayed on screen.
But when cmdunix return no value, the program exit just after the "input through" line.
It does not display "toto" and an empty value for vemail.




Why???

Does have someone a solution for this problem ??

Thanks.

Laurent.


PS: when I launch the sfLDAPGW.sh command with a good login name, the return value is: "DREANO" "Thierry" "t.dreano@corona-medical.com"
 
try:

l:
DO ON ERROR UNDO l, LEAVE l
ON STOP UNDO l, LEAVE l:
input through value(cmdunix) no-echo.
set vnom vprenom vemail no-error.
input close.
END.
 
procedure email:
DEFINE OUTPUT PARAMETER vnom AS CHARACTER FORMAT "x(30)" initial "".
DEFINE OUTPUT PARAMETER vprenom AS CHARACTER FORMAT "x(30)" initial "".
DEFINE OUTPUT PARAMETER vemail AS CHARACTER FORMAT "x(30)" initial "".

input through value(cmdunix) no-echo.
set vnom vprenom vemail no-error.
input close.
END.

run email (output vnom, output vprenom, output vemail) NO-ERROR.
display "toto"
with frame a.
display vemail
with frame b.
 
Top