Re Exit values

Kenneth Brody kenbrody at spamcop.net
Thu Aug 27 11:24:20 PDT 2015


On 8/27/2015 2:13 PM, Richard Kreiss wrote:
>> From: Kenneth Brody [mailto:kenbrody at spamcop.net]
>> Sent: Thursday, August 27, 2015 2:04 PM
>> To: Richard Kreiss <rkreiss at gccconsulting.net>
>> Subject: Re: Re Exit values
>>
>> On 8/27/2015 1:56 PM, Richard Kreiss wrote:
>>> Is there a way on a Window 7 computer to see or record what the exit code
>> issued in a processing table is?
>>
>> The shell can access the exit code via the pseudo-variable "%ERRORLEVEL%"
>>
>>> I am using the follow menu script.
>>>
>>> When EXIT "50" is executed, it appears that the script is not reading this
>> value.
>>
>> "Appears", how?
>>
[...]
>> What does the script do?  It should run the first dclerk (the one I assume
>> executes the EXIT "50") and then go to ":DONE".
>
> If the users cancels the data entry or completes the initial entry and
> does not want to continue entering more data on additional screens, the
> program issues an EXIT "50" which should send the script to done. If they
> want to continue entering information the second dclerk executes.

So what's not working about it?

> Ken, as I think about this, instead of exiting the record, could I not
> change to screen 2 and chain to the more processing table? This avoids the
> problem of having to come back to the record just entered. Or, on chaining
> to More, switch to screen 2 after executing the chain "more".

It does sound awkward to use an exit code to say "exit and then restart on 
screen 2" when a SCREEN command could probably do the job.

Which method is "best" is up to you, since I don't know the details of what 
you're trying to accomplish.

However, that doesn't answer the question of "how does the batch file 
'appear' to not be reading the exit value?"

-- 
Kenneth Brody


More information about the Filepro-list mailing list