If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > exit code status ( Urgent )

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-04, 05:49
gokul_puspa03 gokul_puspa03 is offline
Registered User
 
Join Date: Sep 2004
Posts: 6
exit code status ( Urgent )

Hai all
I am calling 4gl program from another 4gl program .
How to handle the exit codes status , i am getting exit code in terms multiples of 256 .

Please help me

regs

puspa
Reply With Quote
  #2 (permalink)  
Old 09-06-04, 11:11
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Hi,

The RUN statement suspends the 4GL program and invokes the command.
The command has complete control of the screen for the duration of its execution.
For example, the RUN statement can start up a command interpreter
to execute a batch file or to start an interactive session with the user.
When the operating system command terminates, the 4GL program resumes.
You can use the RETURNING clause to capture the exit status of the command.
You can also use the WITHOUT WAITING clause to run a command in the
background while the 4GL program continues to execute.

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 09-07-04, 05:24
matute matute is offline
Registered User
 
Join Date: Jun 2004
Location: Madrid, Spain
Posts: 47
Hi,

It was an anoying feature of the old 4GL versions. It should be fixed in newer versions. Anyway the workaround is to divide the resulting value by 256. I'd put some kind of control on the value to asure compatibility when you migrate your 4GL version, like in:

if abs(returncode)>256 then
returncode=returncode/256
end if

Hope it helps.
__________________
José Luis Matute.

Regards from Spain.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On