[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Meaning of a Process Monitor status of 'Completed' for an SQR



This is how we force a successful status on our jobs.  For some reason, we
occasionally get an "Error" status when the code finished successfully.
Since End-Process is the last call before program termination, we know we
have made it through the meat of the program and it's ok to force a
"success".

begin-program
        do init-report
        do Main-Process
        Do End-Process
        show 'total loops = ' #counter
        do Get-Current-DateTime
        Show 'Program exit ' $AsOfNow
end-program

!----------------------------------------------------------------------!
Begin-Procedure End-Process
    if $prcs_process_instance <> ''
       let $prcs_run_status = 'S'
       let $prcs_message_parm1 = 'Successful'
       do Update-Prcs-Run-Status                !Procedure in Prcsapi.sqc
    end-if
End-Procedure End-Process
!----------------------------------------------------------------------!

-----Original Message-----
From: Al H [mailto:star111lists@MINDSPRING.COM]
Sent: Tuesday, April 16, 2002 2:37 PM
To: SQR-USERS@list.iex.net
Subject: Re: Meaning of a Process Monitor status of 'Completed' for an
SQR


There are multiple steps.  You can drill down to them by looking at
stdapi.sqc.

The first step actually occurs at the call to stdapi-init, where the
variable #prcs_run_status is set to a numeric value that represents
"Processing" and the database is updated.  After that,
#prcs_run_status is set to the value representing "Successful".
However the database is not updated again until stdapi-term has been
called.

Therefore if you need to change the status to another value such as
"Error" or "Unsuccessful" you can do so at any time between
stdapi-init and stdapi-term.

If something is causing the status to go to "Success" before the
program is done, then either there is some code executing between your
call to stdapi-term and the end of the program, or something else is
happening to call the procedure that updates the process scheduler
status.

On Tue, 16 Apr 2002 08:46:17 -0700, you wrote:

>Jagadish,
>
>It has the API SQC included -- and the process has
>previously run to 'Success' as it should.
>
>Where is the logic to Assign the status?  I thought
>this might tell me where the problem is.
>
>Thanks,
>JEJ
>
>
>
>--- Jagadish Sudarsanam <Sudarsanam_Jagadish@CAT.COM>
>wrote:
>> Call the procedure  'Stdapi-Term' just before the
>> 'End-Program' statement,
>> which finally updates the Process monitor status to
>> 'Success'.  #include
>> the 'STDAPI.SQC' for the procedure reference.
>>
>> The Process monitor status is updated by
>> 'PRCSAPI.SQC'
>>
>> Jagadish
>>
>>
>>
>>
>>                     Joe Johnson
>>                     <jej1216@YAHOO
>>                     .COM>
>>                     Sent by:
>>                     "Discussion of
>>                     SQR, Brio      To:
>> SQR-USERS@list.iex.net
>>                     Software's     cc:
>>                     database
>>                     reporting
>>                     language"
>>                     <SQR-USERS@lis        Subject:
>>   Meaning of a Process Monitor staus of 'Completed'
>> for an SQR
>>                     t.iex.net>
>>
>>
>>                     04/16/2002
>>                     09:27 AM
>>                     Please respond
>>                     to sqr-users
>>
>>
>>
>>
>>
>> Caterpillar: Confidential Green          Retain
>> Until: 05/16/2002
>>                                          Retention
>> Category:  G90 -
>>                                          Information
>> and Reports
>>
>>
>>
>>
>> Greetings, Group
>>
>> I am running a rahter involved SQR through Process
>> Scheduler, and the Monitor gives it a status of
>> 'Completed' before it truly has completed.  The log
>> shows no errors, but it clearly processed less rthan
>> half of the data it was set to.
>>
>> Anyone experience this status message?
>>
>> I know there is an included SQC that sets the
>> status,
>> but so far I have not identified exactly where this
>> staus is set.
>>
>> I appreciate any advice.
>>
>> Thanks,
>>
>> Joe Johnson
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Yahoo! Tax Center - online filing with TurboTax
>> http://taxes.yahoo.com/
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Tax Center - online filing with TurboTax
>http://taxes.yahoo.com/