[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference acadmy::tpas_notes

Title:Transfer Price Administration System
Notice:Conference has moved to ACADMY::TPAS_NOTES
Moderator:ACADMY::MAGNI
Created:Wed Jul 01 1992
Last Modified:Fri Mar 21 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:102
Total number of notes:459

55.0. "SQL status and VMS status always 0" by FUTURS::TON () Thu Jan 05 1995 12:09

I accidentally redefined TPAS$DB to point to a nonexistant location, and
when ran the demo programs, the following error text was returned...


TPAS_RECEIVE_STATUS of DEMOSITE\SEND_TPAS_REQUEST
    TPAS_RECEIVE_FACILITY_MSG:  "%APPIX-"
    TPAS_RECEIVE_PART_STATUS_CODE:      "F"
    TPAS_RECEIVE_ERROR_MESSAGE: "-SQLRDBERROR, SQL              "

yet both TPAS_SQL_ERROR and TPAS_VMS_ERROR were 0. Strange, since a VMS 
status of 0 has no
meaning (ss$_normal = 1), and a SQL status of 0 means success. I have tried
various other conditions that result in error text being returned, but
neither the VMS nor the SQL status field ever contained a value other that
0.

Why is this so?

Whilst on the subject of error codes...

It appears to me that to determine if a call to TPAS_CALC_TRNSFR_PRC has
succeded or not, I must consult TPAS_RECEIVE_PART_STATUS_CODE. If I wish
to take different actions depending on the particular error encountered, I
have to compare strings (TPAS_RECEIVE_ERROR_MESSAGE). Is this correct.

Generally, if I call a function, I expect the function to return a
completeion status code (a longword), which I can compare against a list of
predefined constants (like SQL calls, syscalls, RTL calls, etc) to
determine what action I need to take. If I need to know the text associated
with the status code, I can extract it from a message file.

Does TPAS not have its own status codes? Does TPAS have its own message
file?


George Ton
TOLAS Development

T.RTitleUserPersonal
Name
DateLines
55.1ERROR_STATUS AWARD::MAGNIIM&T - 223-9837Mon Jan 09 1995 16:0985
We do use a separate message library and translate the messages. I will 
put a PCR up for the SQL_ERROR and VMS_ERROR setting and check all the places
that those fields are set. Sending these error codes are new for TPAS II. With
TPAS I the ERROR_STATUS X(80) was used in the format:
	%APPIX-*-***************x(54)
	       | |              |_______message 
	       | |___ 15 character error code 
	       |____ status = F,W,I,S


The following are the error that have a higher probability of occuring. The
complete list of errors can be found in the users guide. By checking for a 
status of 'F' (fatal) and these 15 characters you should get all the fatals. 

The errors proceded by :
** - As you are not using the stockrooms or plant neumonics these errors will
     not occur.

*** - we validate the TPAS$DB prior to sending out. Unless you are obtaining
      from the TPAS$XCLDD_DB and you have popluated the TPAS$XCLDD_DB without 
      using the TPAS_XCLDD.EXE or there is a problem in the SQL IMPORT of the 
      TPAS$DB these error should not occur.



PARTNOF	 	<Part Id requested is not on file>
PARTNOAP	<Part Id requested is not approved for distribution>
!
NOERRCD		<No message text for returned message code>
TPASFATAL       <FATAL ERROR>
SQLRDBERROR     <SQL-RDB Error>
!
! stockrm to area
GETSTKRMFAILED  <Call to TPAS_TO_STKRM_AREA routine Failed>
**GETSTKRMTO      <TO Stockroom Code not on CORP. TABLE>
**GETSTKRMFROM    <FROM Stockroom Code not on CORP. TABLE>
**GETPLNTFROM     <FROM PLANT MNEMONIC CODE not on CORP. TABLE>
**GETPLNTTO       <TO PLANT MNEMONIC CODE not on CORP. TABLE >
INVLDAREAFROM   <FROM TRANSFER AREA CODE is spaces>
INVLDAREATO     <TO TRANSFER AREA CODE is spaces>
**INVLDPLNTFROM   <FROM PLANT MNEMONIC CODE is spaces >
**INVLDPLNTTO     <TO PLANT MNEMONIC CODE is spaces>
**NOSHIPLOGNAM    <TPAS$SHIPPING_DATA Logical not defined >
INVLDSHIPLOG    <INVALID TPAS$BILL_TO/FROM_TYPE_CD Logical, must be S ,P, T, B>
TOAREANONTPAS   <TO Transfer AREA CODE not on TPAS$DB >   
FROMAREANOTPAS  <FROM Transfer AREA CODE not on TPAS$DB >
!
! GET PART Error
!
GETPARTFAILED   <CALL TPAS_GET_PART routine Failed>
NOUSEAMPLOGNAM  <TPAS$USE_AMPS Logical not defined>
NOAMPSAVAILOG   <TPAS$AMPS_AVAILABLE Logical not defined>
AMPSFILENOF     <AMP2 SATELLITE FILE NOT FOUND>
!
! GET LOCAL PART Error
!
STDCOSTNOF      <STD COST is ZERO , Transfer Price cannot be calculated>
ZSCPARTFAILED   <CALL TPAS_ZSC_PART routine Failed>
NOSCONLOCAL     <NO STD COST Found from TPAS_GET_LOCAL_COST FILE >
NOLOCALFILE     <Unsuccessful TPAS_GET_LOCAL_COST CALL>
BADSPAWNMAIL    <Unsuccessful Spawn for TPAS_GET_LOCAL_COST Mail Message>
!
! GET PRICING TABLE
!
PTICMMSELECT	<PRICING_TABLE SQL Select transaction, No record found>
***PTIINVALID      <INVALID PTI, PART TYPE INDICATOR IS NOT "S","D","M","N" or "O">
***CMMINVALID      <INVALID CMM,  Calc MLP Mult < 1>
!
! GET DISCOUNT TABLE
!   
DSCNTSELECTNOF	<DISCOUNT_TABLE SQL Select transaction, No record found>
***SCUINVALID      <INVALID SCU,  Standard Cost Uplift not numeric for PTI = "S">
***DSCNTPRCNT      <DISCOUNT Percent greater than or = 1 for PTI = "D" or "M">
!
! TPAS_CALC_TRNSFR_PRC logic errors
!
BASEPRCALCERR	<Base Price calculation error>
INVTRNSFRPRCD	<Invalid transfer processing code>
INVSHIPTYPCD    <Ship_type_cd should be 1, 2, 3 or 4>
!
! TPAS_GET_NOR errors
!
MSSGNOR         <NOR not available for country on NOR table>