[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

10.0. "Physical Design Feedback" by AWARD::MAGNI (EWIS - APPIX/FMAP in MSO2) Wed Jul 01 1992 13:27

	The replies to this note will be any feedback on the Physical
	Design as issued by the EWIS organization.
T.RTitleUserPersonal
Name
DateLines
10.1TPAS$DB Business Rules for SearchAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Mon Aug 17 1992 13:0097
The following can be found in:
	TPAS$PUBLIC:TPAS_DB_SEARCH_BUSINESS_RULES.txt/ps

          1  TPAS Database Search Criteria

              The TPAS database will contain discount, pricing and transfer
              area data. The former two are used to calculate the trans-
              fer price and will be found in the database via the following
              criteria.


          1.1  Pricing Data

              The pricing data, which gives the Transfer Pricing Code and MLP
              Calculation Factor, will be obtained by searching the database
              in the following order:

              Table_1:_PRICING_TABLE_LOOKUP_-_BUSINESS_RULES_-_ORDERED_______

                                                                  EFCTVY END
              ___________PART_NUMBER_____________EFCTVY_DATE______DATE_______

                         Exact Match             =< Today         > Today or
                                                                  Null

              _______________________________________________________________
              PART_CLASS_______PART_TYPE_____________________________________

              exact match      exact match       =< Today         > Today or
                                                                  Null

              exact match      *** match         =< Today         > Today or
                                                                  Null

              ** match         exact match       =< Today         > Today or
                                                                  Null

              ** match         *** match         =< Today         > Today or
              ____________________________________________________Null_______


          1.2  Discount Data

              The discount data, which gives the Standard Cost Uplift and MLP
              Discount Percent, will be obtained by searching the database in
              the following order:

              Table_2:_DISCOUNT_TABLE_LOOKUP_-_BUSINESS_RULES_-_ORDERED______

                                                                        EFCTVY
                                                            EFCTVY      END
              _____PART_NUMBER_______FROM_______TO__________DATE________DATE_

                   Exact Match       *** Match  *** Match   =< Today    >
                                                                        Today
                                                                        or
                                                                        Null

                   Exact Match       Exact      Exact       =< Today    >
                                     Match      Match                   Today
                                                                        or
                                                                        Null

                   Exact Match       Exact      *** Match   =< Today    >
                                     Match                              Today
                                                                        or
                                                                        Null

                   Exact Match       *** Match  Exact       =< Today    >
                                                Match                   Today
                                                                        or
                                                                        Null
              _______________________________________________________________

              PART
              CLASS______PART_TYPE___________________________________________

              Exact      Exact       Exact      Exact       =< Today    >
              Match      Match       Match      Match                   Today
                                                                        or
                                                                        Null

              Exact      *** Match   Exact      Exact       =< Today    >
              Match                  Match      Match                   Today
                                                                        or
                                                                        Null

              ** Match   Exact       Exact      Exact       =< Today    >
                         Match       Match      Match                   Today
                                                                        or
                                                                        Null

              ** Match   *** Match   Exact      Exact       =< Today    >
                                     Match      Match                   Today
                                                                        or
              __________________________________________________________Null_

10.2TRANFER PRICING CODE Returned ValuesAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Mon Aug 17 1992 14:0943
The Transfer Pricing Code is supplied by Corporate Tax in the Pricing Table 
of the TPAS$DB. The field values allowed are S - Standard Cost, M - MLP and 
D - Derived MLP. These values let the TPAS_CALC_TRNSFR_PRC program know how 
to calculate the Base Price. As MLP can be zero or transfer price can be 
less than standard cost, logic is embedded in the code to re-calculate the
base price via different data. Because of this, the following values for the 
TRNSFR_PRCG_CD will be returned from the TPAS_CALC_TRNSFR_PRC to the calling 
program to reflect the orginal TRNSFR_PRCG_CD and the re-calculated price:

      Table_1:_TRANSFER_PRICING_CODE_VALUES_RETURNED_________________

      TRNSFR_
      PRCG_CD_____BASE_PRICE_________________TRANSFER_PRICE______________

      S           STD_COST                   BASE_PRC * (1 + STD_UPLFT_%)

      M           MLP                        BASE_PRC * (1 - MLP_DSCNT_%)

      D           STD_COST * MLP_CALC_FCTR   BASE_PRC * (1 - MLP_DSCNT_%)

       _______________________________________________________________
       _____________If TRNSFR_PRCG_CD = 'M' AND MLP <= 0______________

      A           STD_COST * MLP_CALC_FCTR   BASE_PRC * (1 - MLP_DSCNT_%)

       _______________________________________________________________
       __If TRNSFR_PRCG_CD = 'D' AND Transfer_Price < Standard_Cost___

      B           STD_COST                   BASE_PRC * (1 + STD_UPLFT_%)

       _______________________________________________________________
       __If TRNSFR_PRCG_CD = 'M' AND Transfer_Price < Standard_Cost___

      C           STD_COST                   BASE_PRC * (1 + STD_UPLFT_%)

       _______________________________________________________________
       __If TRNSFR_PRCG_CD = 'A' AND Transfer_Price < Standard_Cost___

      E           STD_COST                   BASE_PRC * (1 + STD_UPLFT_%)

       _______________________________________________________________
       _______________________________________________________________
  
10.3TPAS_CALC_TRNSFR_PRC DATA TYPES FOR BASICAYOV29::JMCDOWALLMon Aug 31 1992 09:3532
    
    
    Can you please answer the following query I have around the output
    from the TPAS_CALC_TRNSFR_PRC module.
    
    	TPAS Physical Design Data Item		VMS Standard
    	------------------------------		------------
    
    	STD_COST	S9(8)V9(6) COMP		Quadword Integer
    
    	MLP		S9(14)V9(2) COMP	Quadword Integer
    
    	MLP_CALCN_FCTR  9(1)V9(2)     		Word Integer
    
    	BASE_PRC        9(10)V9(3) COMP         Quadword Integer
    
    	MLP_DSCNT_PERCT	V9(2)                   ?
    
    	STD_COST_UPLFT_PERCT 9(1)V9(2)          Word Integer
    
    	PRODT_TRNSFR_PRC 9(10)V9(3) COMP        Quadword Integer

    
    The program that will receive these fields, is written in BASIC and I
    am unsure what the data types should be.  I would be grateful if you
    could respond urgently as it is holding up our coding.
    
    
    Regards
    Josephine McDowall 
    (Ayr)
    
10.4Format for BASIC will be postedAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Mon Aug 31 1992 13:397
    Josephine,

	The BASIC code to call the TPAS code and receive the data is
	being written this week. As soon as it is complete the data
	types and call format will be posted.

	Lois Magni
10.5Local BASIC Program calling TPAS_CALC_TRNSFR_PRCAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Wed Sep 09 1992 16:14127
  Attached is a skeleton of a BASIC program that call the TPAS_CALC_TRNSFR_PRC.
  Note there is no special compile commands needed for this call.


! 
! No special compile command needed
! 
! SEND INPUT TO THE CALLED TPAS_CALC_TRNSFR_PRC PROGRAM
!*+
!********************************  TPAS  ************************************
!*-                       PICTURE            IN COBOL    IN BASIC
! STD_COST                S(08).9(06).        COMP-2      DOUBLE
! MLP                     S(14).9(02).        COMP-2      DOUBLE
! CMM                      (01).9(02).        COMP-1      SINGLE
! BASE_PRICE               (10).9(03).        COMP-2      DOUBLE
! DISCOUNT_PERCENT             .9(02).        COMP-1      SINGLE
! STD_COST_UPLIFT          (01).9(02).        COMP-1      SINGLE
! TRANSFER_PRICE           (10).9(03).        COMP-2      DOUBLE
!
! ALL OTHER FIELDS PASSED ARE STRING FIELDS


MAP (MAP_TPAS_TRANS_RECORD)   STRING  TPAS_REQUEST_PART              = 30%, &
                              STRING  TPAS_TRANS_SHIP_FROM_STKRM     = 03%, &
                              STRING  TPAS_TRANS_SHIP_TO_STKRM       = 03%, &
                              STRING  TPAS_RECEIVE_FROM_TRNSFR_AREA  = 03%, &
                              STRING  TPAS_RECEIVE_TO_TRNSFR_AREA    = 03%, &
                              STRING  TPAS_RECEIVE_FROM_PLNT_PNEMNC  = 02%, &
                              STRING  TPAS_RECEIVE_TO_PLNT_PNEMNC    = 02%, &
                              STRING  TPAS_RECEIVE_PART_TYPE         = 03%, &
                              DOUBLE  TPAS_RECEIVE_STD_COST                ,& 
                              DOUBLE  TPAS_RECEIVE_MLP                     ,& 
                              SINGLE  TPAS_RECEIVE_CMM                     ,&
                              DOUBLE  TPAS_RECEIVE_BASE_PRICE              ,& 
                              STRING  TPAS_RECEIVE_PRICE_TYPE_IND    = 01%, &
                              SINGLE  TPAS_RECEIVE_DISCOUNT_PERCENT        ,&
                              SINGLE  TPAS_RECEIVE_STD_COST_UPLIFT         ,& 
                              DOUBLE  TPAS_RECEIVE_TRANSFER_PRICE          ,&
                              STRING  TPAS_RECEIVE_FACILITY_MSG      = 07%, &
                              STRING  TPAS_RECEIVE_PART_STATUS_CODE  = 01%, &
                              STRING  TPAS_RECEIVE_ERROR_MESSAGE     = 72%

!******************************************************************************
        .
        .
        .

        LET TPAS_REQUEST_PART,            TPAS_TRANS_SHIP_FROM_STKRM,    &
            TPAS_TRANS_SHIP_TO_STKRM,     TPAS_RECEIVE_FROM_TRNSFR_AREA, &
            TPAS_RECEIVE_TO_TRNSFR_AREA,  TPAS_RECEIVE_TO_PLNT_PNEMNC,   &
            TPAS_RECEIVE_FROM_PLNT_PNEMNC,TPAS_RECEIVE_PART_TYPE,        &
            TPAS_RECEIVE_PRICE_TYPE_IND,  TPAS_RECEIVE_FACILITY_MSG,     &
            TPAS_RECEIVE_PART_STATUS_CODE,TPAS_RECEIVE_ERROR_MESSAGE   = ""

        LET TPAS_RECEIVE_CMM,             TPAS_RECEIVE_DISCOUNT_PERCENT, &
            TPAS_RECEIVE_STD_COST_UPLIFT, TPAS_RECEIVE_STD_COST,         &
            TPAS_RECEIVE_MLP,             TPAS_RECEIVE_BASE_PRICE,       &
            TPAS_RECEIVE_TRANSFER_PRICE  = 0

        .
        .
        .
        ! Move data into 
        !   TPAS_REQUEST_PART
        !   TPAS_TRANS_SHIP_FROM_STKRM
        !   TPAS_TRANS_SHIP_TO_STKRM 
        .
        .
        .


           CALL TPAS_CALC_TRNSFR_PRC ( TPAS_REQUEST_PART     BY REF, & 
                             TPAS_TRANS_SHIP_FROM_STKRM      BY REF, & 
                             TPAS_TRANS_SHIP_TO_STKRM        BY REF, & 
                             TPAS_RECEIVE_FROM_TRNSFR_AREA   BY REF, & 
                             TPAS_RECEIVE_TO_TRNSFR_AREA     BY REF, & 
                             TPAS_RECEIVE_FROM_PLNT_PNEMNC   BY REF, & 
                             TPAS_RECEIVE_TO_PLNT_PNEMNC     BY REF, & 
                             TPAS_RECEIVE_PART_TYPE          BY REF, & 
                             TPAS_RECEIVE_STD_COST           BY DESC,& 
                             TPAS_RECEIVE_MLP                BY DESC,& 
                             TPAS_RECEIVE_CMM                BY DESC,& 
                             TPAS_RECEIVE_BASE_PRICE         BY DESC,& 
                             TPAS_RECEIVE_PRICE_TYPE_IND     BY REF, & 
                             TPAS_RECEIVE_DISCOUNT_PERCENT   BY DESC,&
                             TPAS_RECEIVE_STD_COST_UPLIFT    BY DESC,& 
                             TPAS_RECEIVE_TRANSFER_PRICE     BY DESC,&
                             TPAS_RECEIVE_FACILITY_MSG       BY REF, & 
                             TPAS_RECEIVE_PART_STATUS_CODE   BY REF, & 
                             TPAS_RECEIVE_ERROR_MESSAGE      BY REF)


        .
        .
        .
        !
        ! Check PART_STATUS_CODE - if "F" then handle fatal error 
        ! 

        .
        .
        .
!              PRINT "MLP              : "; 
!                PRINT USING "##############.##", TPAS_RECEIVE_MLP      
!              PRINT "SHIP FROM        : "; TPAS_TRANS_SHIP_FROM_STKRM;
!                PRINT " - "; TPAS_RECEIVE_FROM_TRNSFR_AREA ;
!                PRINT " - "; TPAS_RECEIVE_FROM_PLNT_PNEMNC
!              PRINT "PART TYPE        : "; TPAS_RECEIVE_PART_TYPE            
!              PRINT "SHIP TO          : "; TPAS_TRANS_SHIP_TO_STKRM;
!                PRINT " - "; TPAS_RECEIVE_TO_TRNSFR_AREA ;
!                PRINT " - "; TPAS_RECEIVE_TO_PLNT_PNEMNC
!              PRINT "CMM              : "; 
!                 PRINT USING "#.##", TPAS_RECEIVE_CMM   
!              PRINT "PRICE TYPE CODE  : "; TPAS_RECEIVE_PRICE_TYPE_IND      
!              PRINT "BASE PRICE       : "; 
!                PRINT USING "##########.###", TPAS_RECEIVE_BASE_PRICE
!              PRINT "DISCOUNT PERCENT : ";
!                 PRINT USING  ".##", TPAS_RECEIVE_DISCOUNT_PERCENT
!              PRINT "STD_COST UPLIFT  : ";
!                 PRINT USING  "#.##", TPAS_RECEIVE_STD_COST_UPLIFT
!              PRINT "TRANSFER PRICE   : "; 
!                PRINT USING  "##########.###", TPAS_RECEIVE_TRANSFER_PRICE
!              PRINT "TPAS TRANS STATUS: "; TPAS_RECEIVE_STATUS               

        .
        .
        .
10.6Local COBOL program that calls TPAS_CALC_TRNSFR_PRCAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Wed Sep 09 1992 16:16101
  Attached is a skeleton of a COBOL program that calls the TPAS_CALC_TRNSFR_PRC.
  Note there is no special compile commands needed for this call.


* SEND INPUT TO THE CALLED TPAS_CALC_TRNSFR_PRC PROGRAM
**+
*********************************  TPAS  ************************************
**-                       PICTURE            IN COBOL    IN BASIC
* STD_COST                S(08).9(06).        COMP-2      DOUBLE
* MLP                     S(14).9(02).        COMP-2      DOUBLE
* CMM 	                   (01).9(02).        COMP-1      SINGLE
* BASE_PRICE               (10).9(03).        COMP-2      DOUBLE
* DISCOUNT_PERCENT             .9(02).        COMP-1      SINGLE
* STD_COST_UPLIFT          (01).9(02).        COMP-1      SINGLE
* TRANSFER_PRICE           (10).9(03).        COMP-2      DOUBLE
*
* ALL OTHER FIELDS PASSED ARE STRING FIELDS
*

IDENTIFICATION DIVISION.
	.
	.
	.
WORKING-STORAGE SECTION.
	.
	.
	.

******************* call    PARAMETERS  **************************
01  SEND_TPAS_REQUEST.
    05 SEND_TPAS_REQUEST_PART                           PIC X(30).
    05 SEND_TPAS_REQ_SHIP_FROM_STKRM                    PIC 9(03).
    05 SEND_TPAS_REQ_SHIP_TO_STKRM                      PIC 9(03).
    05 TPAS_RECEIVE_FROM_SITE_CODE                      PIC X(03).
    05 TPAS_RECEIVE_TO_SITE_CODE                        PIC X(03).
    05 TPAS_RECEIVE_TO_PLNT_PNEMNC                      PIC X(02).
    05 TPAS_RECEIVE_FROM_PLNT_PNEMNC                    PIC X(02).
    05 TPAS_RECEIVE_PART_TYPE                           PIC X(03).
    05 TPAS_RTN_STD_COST                            	COMP-2.
    05 TPAS_RTN_MLP                                     COMP-2.
    05 TPAS_RTN_CMM                                     COMP-1.
    05 TPAS_RTN_BASE_PRICE                              COMP-2.
    05 TPAS_RECEIVE_PRICE_TYPE_IND                      PIC X(01).
    05 TPAS_RTN_DISCOUNT_PERCENT                        COMP-1. 
    05 TPAS_RTN_STD_COST_UPLIFT                         COMP-1.
    05 TPAS_RTN_TRANSFER_PRICE                          COMP-2.
    05 TPAS_RECEIVE_STATUS.
       10  TPAS_RECEIVE_FACILITY_MSG                    PIC X(7).
       10  TPAS_RECEIVE_PART_STATUS_CODE                PIC X(1).
       10  TPAS_RECEIVE_ERROR_MESSAGE                   PIC X(72).

01 RTN_VARIABLE_REFORMATTED.
    05 TPAS_RECEIVE_STD_COST                            PIC S9(08)V9(06) COMP.
    05 TPAS_RECEIVE_MLP                                 PIC S9(14)V9(02) COMP.
    05 TPAS_RECEIVE_CMM                                 PIC 9(01)V9(02).
    05 TPAS_RECEIVE_BASE_PRICE                          PIC 9(10)V9(03)  COMP.
    05 TPAS_RECEIVE_DISCOUNT_PERCENT                    PIC V9(02).
    05 TPAS_RECEIVE_STD_COST_UPLIFT                     PIC 9(01)V9(02).
    05 TPAS_RECEIVE_TRANSFER_PRICE                      PIC 9(10)V9(03)  COMP.

*-------------------------------------------------------------------------------
*                P R O C E D U R E    D I V I S I O N
*-------------------------------------------------------------------------------
	.
	.
	.

*
* Populate the fields to send 
*	SEND_TPAS_REQUEST_PART
*	SEND_TPAS_REQ_SHIP_FROM_STKRM
*	SEND_TPAS_REQ_SHIP_TO_STKRM
*
	.
	.
	.

           CALL "TPAS_CALC_TRNSFR_PRC" USING SEND_TPAS_REQUEST.
*
*         Check PART_STATUS_CODE - if "F" then handle fatal error 
*
	   MULTIPLY TPAS_RTN_STD_COST
			BY 1 GIVING  TPAS_RECEIVE_STD_COST         ROUNDED.
 	   MULTIPLY TPAS_RTN_MLP
			BY 1 GIVING  TPAS_RECEIVE_MLP              ROUNDED.     
	   MULTIPLY TPAS_RTN_CMM
			BY 1 GIVING  TPAS_RECEIVE_CMM              ROUNDED.
	   MULTIPLY TPAS_RTN_BASE_PRICE
			BY 1 GIVING  TPAS_RECEIVE_BASE_PRICE       ROUNDED.
	   MULTIPLY TPAS_RTN_DISCOUNT_PERCENT
			BY 1 GIVING  TPAS_RECEIVE_DISCOUNT_PERCENT ROUNDED.
	   MULTIPLY TPAS_RTN_STD_COST_UPLIFT
			BY 1 GIVING  TPAS_RECEIVE_STD_COST_UPLIFT  ROUNDED.
	   MULTIPLY TPAS_RTN_TRANSFER_PRICE
			BY 1 GIVING  TPAS_RECEIVE_TRANSFER_PRICE   ROUNDED.  

	.
	.
	.

10.8TPAS_GET_LOCAL_COST.BASAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Wed Sep 09 1992 16:2424


  Attached is a skeleton of a the TPAS_GET_LOCAL_COST in BASIC that 
  is called by TPAS_ZSC_PART. 
  Note compile as:   BASIC/LONG/DOUBLE TPAS_GET_LOCAL_COST


1 SUB TPAS_GET_LOCAL_COST (ZSC_PART_NO$, TPAS_GET_LOCAL_STD_COST)

!*
!*	COMPILE   BASIC/LONG/DOUBLE
!*		  =================
	.
	.
	.    
!
! get local standard cost
!
      TPAS_GET_LOCAL_STD_COST =  local standard cost
	.
	.
	.    
      SUBEND
10.9Skeleton of TPAS_GET_LOCAL_COST.COBAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Fri Sep 11 1992 10:5351
             <<< AWARD::AWARD$COMMON:[NOTES$LIBRARY]TPAS.NOTE;2 >>>
                   -< Transfer Price Administration System >-
================================================================================
Note 10.7                   Physical Design Feedback                      7 of 8
AWARD::MAGNI "EWIS - APPIX/FMAP in MSO2"             43 lines   9-SEP-1992 15:20
                    -< Skeleton of TPAS_GET_LOCAL_COST.COB >-
--------------------------------------------------------------------------------


  Attached is a skeleton of a the TPAS_GET_LOCAL_COST in COBOL that 
  is called by TPAS_ZSC_PART. 
  Note there is no special compile commands needed for this call.


IDENTIFICATION DIVISION.
PROGRAM-ID.  TPAS_GET_LOCAL_COST.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER.  VAX-11.
OBJECT-COMPUTER.  VAX-11.
DATA DIVISION.

WORKING-STORAGE SECTION.
01  LOCAL_STD_COST                      PIC 9(08)V9(6).
	.
	.
	.

LINKAGE SECTION.
01  ZSC_PART_NO				PIC X(30).
01  TPAS_GET_LOCAL_STD_COST             COMP-2.


PROCEDURE DIVISION USING ZSC_PART_NO,
                         TPAS_GET_LOCAL_STD_COST.

	.
	.
	.
      MOVE ZEROS TO TPAS_GET_LOCAL_STD_COST, LOCAL_STD_COST.         
*
*  get local standard cost
*
      MULTIPLY LOCAL_STD_COST BY 1 GIVING TPAS_GET_LOCAL_STD_COST ROUNDED.
	.
	.
	.

      EXIT PROGRAM.


10.10ERROR CODESAYOV29::JMCDOWALLMon Sep 21 1992 12:347
    
    Please advise when the error codes that will be passed back from TPAS,
    will be available.
    
    
    Regards
    Josephine (823 3162) 
10.11Rough list available in TPAS$PUBLICAWARD::MAGNIEWIS - APPIX/FMAP in MSO2Mon Sep 21 1992 15:2020
  Josephine

  There is a list of error codes in AWARD::TPAS$PUBLIC:TPAS_ERROR_MESSAGES.TXT

  The TPAS_CALC_TRNSFR_PRC program will be sending back only Success and Fatal
  errors. The format will be

        APPIX$-F-error code & error message
        APPIX$-S-error code & error message

   As for a complete list, those will be available once testing of the
   Logic module has been completed. KAO and I believe AYO are the test
   sites. I do not see any more fatal error codes being needed, though
   one never knows. 
   As for a date to a fancy document with the complete error list and 
   suggested actions, I will venture to say mid to late October.
   If there are specific questions to the document in TPAS$PUBLIC - let 
   me know.

   Lois
10.12TPAS_STATUS (error code)AYOV29::JMCDOWALLTue Oct 13 1992 10:2412
    
    From the error codes in TPAS_ERROR_MESSAGES.TXT in the
    AWARD::TPAS$PUBLIC area, I'm a bit confused as to what the 16 character
    code is e.g. "GETSTKRMFAILED" and where it fits into the 80 character
    return "TPAS_STATUS".  
    
    I think it is the first 16 characters of the 72 character message -
    please confirm.
    
    
    Regards
    Josephine
10.13Return Error DescriptionAWARD::MAGNIIM&amp;T - 223-9837Wed Oct 14 1992 10:3344
The error message sent back from TPAS_CALC_TRNSFR_PRC to the calling code 
is formatted as such:

   01 TPAS_RESULT_STATUS.
       05  TPAS_RESULT_FACILITY_MSG                    PIC X(7).
       05  TPAS_RESULT_PART_STATUS_CODE                PIC X(1).
       05  TPAS_RESULT_ERROR_MESSAGE                   PIC X(72).

Which translates into the message utility description:
    
	FACILITY        The abbreviate name of the software component
	L (level) 	PIC X(1).
	IDENT		up to  PIC X(15).
        MESSAGE-TEXT 	up to  PIC X(255).

So an error you would receive will look like this:

  %APPIX-F-GETSTKRMFAILED, CALL TPAS_TO_STKRM_AREA routine Failed

Where:
	%APPIX-	      	is TPAS_RESULT_FACILITY_MSG      PIC X(7).

	F		is TPAS_RESULT_PART_STATUS_CODE  PIC X(1).

	-GETSTKRMFAILED, CALL TPAS_TO_STKRM_AREA routine Failed
			is TPAS_RESULT_ERROR_MESSAGE     PIC X(72).
                        Where the first character is always a hyphen, "-",
			up to the next 15 characters are the message IDENT,
			a 1 character comma, ","
			and a minimum of 55 characters for the message text.


We opted to use only a total of 80 characters so the message could appear on
the terminal without wrap. Because the IDENT portion of the error can be up
to 15 characters but can be less we opted to combine the IDENT and MESSAGE TEXT
so that more of the message text can be sent.

Here are some examples:

%APPIX-F-AMPSFILENOF, AMP2 SATELLITE FILE NOT FOUND
%APPIX-F-PARTNOF, Part Id requested is not on file
%APPIX-F-GETPLNTFROM, FROM PLANT MNEMONIC CODE not on CORP. TABLE

A full description of the errors and what they mean is forth coming.
10.14Return Value 'F' - 'interplant pricing'AWARD::MAGNIIM&amp;T - 223-9837Mon Nov 02 1992 11:5858
     ******** UPDATED RETURNED VALUES -- NEW CODE OF 'F' *********

              The Transfer Pricing Code is supplied by Corporate Tax in the
              Pricing Table of the TPAS$DB. The field values allowed are S
              - Standard Cost, M - MLP and D - Derived MLP. These values
              let the TPAS_CALC_TRNSFR_PRC program know how to calculate
              the Base Price. As MLP can be zero or transfer price can be
              less than standard cost, logic is embedded in the code to re-
              calculate the base price via different data. Because of this,
              the following values for the TRNSFR_PRCG_CD will be returned
              from the TPAS_CALC_TRNSFR_PRC to the calling program to reflect
              the original TRNSFR_PRCG_CD and the re-calculated price:

              Table_1:_TRANSFER_PRICING_CODE_VALUES_RETURNED_________________

              TRNSFR_
              PRCG_CD_____BASE_PRICE_____________TRANSFER_PRICE______________

              S           STD_COST               BASE_PRC * (1 + STD_COST_
                                                 UPLFT_PERCT)

              M           MLP                    BASE_PRC * (1 - MLP_DSCNT_
                                                 PERCT )

              D           STD_COST * MLP_        BASE_PRC * (1 - MLP_DSCNT_
                          CALCN_FCTR             PERCT)

              _______________________________________________________________
              _____________If_TRNSFR_PRCG_CD_=_'M'_AND_MLP_<=_0______________

              A           STD_COST * MLP_        BASE_PRC * (1 - MLP_DSCNT_
                          CALCN_FCTR             PERCT )

              _______________________________________________________________
              __If_TRNSFR_PRCG_CD_=_'D'_AND_Transfer_Price_<_Standard_Cost___

              B           STD_COST               BASE_PRC * (1 + STD_COST_
                                                 UPLFT_PERCT)

              _______________________________________________________________
              __If_TRNSFR_PRCG_CD_=_'M'_AND_Transfer_Price_<_Standard_Cost___

              C           STD_COST               BASE_PRC * (1 + STD_COST_
                                                 UPLFT_PERCT)

              _______________________________________________________________
              __If_TRNSFR_PRCG_CD_=_'A'_AND_Transfer_Price_<_Standard_Cost___

              E           STD_COST               BASE_PRC * (1 + STD_COST_
                                                 UPLFT_PERCT)

              _______________________________________________________________
              _________If_TRNSFR_PRC_AREA_TO_=_TRNSFR_PRC_AREA_FROM__________

              F___________STD_COST_______________STD_COST____________________

                                                                            1

10.15Question on the RETURN STATUS of TPAS_GET_TRANSFER+R_PRCZGOMIB::YNTANYN TAN @ZGOTue Nov 17 1992 03:2242
    
    
    Hello,
      Suppose a program calls TPAS_GET_TRNSFR_PRC for a part that is found
    
      in APPIX and which has an APPIX mlp <> 0 but std unit cost = 0  & that
    
      the discount/pricing is not found in the corporate pricing table 
    
      but found in the local exception tables. Assuming TPAS routines
    
      get the local std cost and get the discount/pricing info from
    
       the local exception tables and that the transfer price
      
      is successfully calculated,  what will TPAS_GET_TRNSFER_PRC return
      
      for the result status ?
    
      Here there should be three "error messages" involved : 
    
        SCMLPFROMLOCAL and PRCGFROMXCLDD, DSCNTFROMXCLDD  ???
    
      Which one will TPAS_GET_TRNSFER_PRC return ? 
    
      I ask this because during Rich brown's visit to ZGO, he mentioned
      that we may want to indicate how the transfer price is obtained (e.g.
      local std cost used or excluded file used) when we call TPAS
      routines for our application enhancements.
    
    Rgds.
     Yan Noi
    
       
      
    Rgds,
    
     Yan Noi
      TPAS_GET_TRNSFR.PRC
     
      
    
10.16only fatal and success errors returnedAWARD::MAGNIIM&amp;T - 223-9837Tue Nov 17 1992 12:0922
Yan Noi,

The error messages returned from TPAS_CALC_TRNSFR_PRC to the calling
program will only be FATAL or SUCCESS errors.

All other errors (Warning and Informational) will be displayed by
TPAS_CALC_TRNSFR_PRC on line 22 of screen depending on how you set up
the logicals TPAS$DISPLAY_I_ERRORS and TPAS$DISPLAY_W_ERRORS.

  All informational errors will display if TPAS$DISPLAY_I_ERRORS = Y.
  All Warning errors will display if running in batch OR if 
  TPAS$DISPLAY_W_ERRORS = Y.                          --

The errors you questioned are:
        SCMLPFROMLOCAL - Warning
	PRCGFROMXCLDD  - Informational
	DSCNTFROMXCLDD - Informational

These will not be returned to calling program but displayed as above logicals
dictate.
Regards,
Lois 
10.17how to turn off the warning/info msg in batch runZGOV06::YNTANYN TAN @ZGOSun Dec 13 1992 23:4516
    hello,
        I looked at the TPAS_LOGICALS.COM and it defines
    
        define/nolog tpas$display_w_errors 1
        define/nolog tpas$display_i_errors 1
        
        I changed it to 
        define/nolog tpas$display_w_errors 0
        define/nolog tpas$display_i_errors 0
        thinking that it would turn off the warning/information messages
        displayed in the batch log file. 
        However, these messages are still displayed in the batch log. 
        How do I remove the messages ??
        Please advise.
    Rgds,
      Yan Noi         
10.18These logicals should be Y/NAWARD::MAGNIIM&amp;T - 223-9837Mon Dec 14 1992 12:449
Yan Noi,

These logicals:
	        tpas$display_w_errors 
	        tpas$display_i_errors
Should be Y or N. Did you set there up via the KITINSTAL or did you just
editi the file directly. As in the KITINSTAL I have it requiring Boolean (Y/N).

Lois 
10.19exZGOV02::YNTANYN TAN @ZGOTue Dec 15 1992 19:1711
     Hello Lois,
    
       I think both were defined to be "1" instead of "Y" during the 
       installation (using TPAS004.A) when I answered "Y" to the questions.
       I changed it to "0" for the testing. Anyway, I will
       change it back to "N" or "Y". 
       Thanks for pointing that.
    Rgds,
      Yan Noi
    
      
10.20info/warning messages still displayedZGOV02::YNTANYN TAN @ZGOWed Dec 16 1992 03:2814
    Hello,
       I run my program again in the batch mode and this time I
       define/nolog tpas$display_I_errors N
       define/nolog tpas$display_W_errors N
    
       in the command file but still received the info/warning msgs in the
       log file.
     
       Note: my system logicals for the above two  are 'Y'.
    	     Do I need to redefine the system logicals. I thought the
    	     TPAS logic uses process logicals.
    
    Rgds,
     Yan Noi
10.21batch mode needs it's own process logicalsAWARD::MAGNIIM&amp;T - 223-9837Fri Dec 18 1992 11:4220
Yan Noi,

Currently TPAS does use only Process Logicals - this is being changed to
check the logical name table in the same fashion as VMS (Process, Job, Group,
and System).

One thing to check is that if running in batch - the process logicals
are to be defined in the batch process (inotherwords - right in the stream)

Also, The logic for the displaying of error messages is as follows:

	Display WARNINGS 	if tpas$display_W_errors = Y  OR
			    	   MODE = NON_INTERACTIVE

	Display INFORMATIONAL 	if tpas$display_I_errors = Y  


So when running in Batch WARNING messages will always be displayed.

Lois
10.22Again on the warning messages... More improvement ??ZGOV02::YNTANYN TAN @ZGOSun Dec 20 1992 19:1717
    Hello Lois,
    
      Here are just some of my comments on the warning message. As we run
      our TPAS updates in a nightly batch job, these warning messages cause
      the log file to grow to a significant size (in terms of thousands
      blocks). The warning messages are not useful for processing many
      parts because the part number is not displayed for each warning
      issued.
      I wonder if these warning messages can be improved and also  allow
      the warning messages to be turn off if the user wishes to ?
      What do you think ?
    
    Rgds,
     Yan Noi
    
      
    
10.23I and W errors diplayed only if logical set to YAWARD::MAGNIIM&amp;T - 223-9837Fri Jan 08 1993 14:2613
The TPAS programs have been changed so that they warning and informational
errors will be displayed ONLY if the following logicals are set to "Y".

	TPAS$DISPLAY_I_ERRORS
	TPAS$DISPLAY_W_ERRORS

This change has been made in TPAS006.A - although the TPAS_LOGICALS.COM
is written out with a 1 or 0. This will be fixed in the KITINSTAL for
TPAS007. I will post in this notes file when available, in the meantime
just edit the TPAS_LOGICALS.COM manually.

Regards,
Lois
10.24Transfer Pricing Code "F" zero priceELIS::ELIS::JANSSENRFri Jan 29 1993 08:2711
    Lois,
    
    Is it true that the standard cost price of transfer pricing code 'F' is
    not checked against zero? And no local tables will be read to provide
    this standard cost?
    
    Because we expect that the local parts master file is always checked
    in case of a zero price, we need to know whether to make an exception
    for transfer pricing code 'F'.
    
    Regards, Rinus Jansen
10.25Local Std Cost Always RetrievedAWARD::MAGNIIM&amp;T - 223-9837Fri Jan 29 1993 10:2815
    
�    Is it true that the standard cost price of transfer pricing code 'F' is
�    not checked against zero? And no local tables will be read to provide
�    this standard cost?
    

Part 1 is true, part 2 is not.

If the APPIX Std Cost is needed to calculate the BASE_PRICE and TRANSFER_PRICE,
then, no matter what type of transfer, the std cost is checked to see if > 0. 
If the APPIX_STD_COST <= 0 then the local part standard cost is obtained. 

If the Local Standard Cost is zero the program will return SUCCESS, IF and ONLY
IF, the transfer is an INTERPLANT transfer (Pricing Code = 'F').