Code:
- /* */
- /* Out: 11/17/06 9:14 Ver: 1. 0 Level40 CHRISTEN, DUANE J. - IT&S */
- /* Ref: ANIN120601 ANI Inventory/Add functionality to getANI API (PVS980 */
- /* DJC: Added function retreiveANIWithC#UH */
- /* */
- /* Out: 8/28/06 13:38 Ver: 0. 0 Level40 CHRISTEN, DUANE J. - IT&S */
- /* Ref: ANIN090603 ANI Inventory/Tollfree Autocreate */
- /* DJC: Initial Creation */
-
- /* Copyright McLeod, Inc., as an unpublished work created in
- /* 2006. This program is CONFIDENTIAL, unpublished work of
- /* authorship. IT IS A TRADE SECRET which is the property of
- /* McLeod, Inc. All use, disclosure, and/or reproduction not
- /* specifically authorized by McLeod, Inc., is prohibited.
- /* This program may also be protected under the copyright
- /* and/or trade secret laws of non-U.S. countries. All rights
- /* reserved.
-
- /*=============================================================================================
- /* Notes
- /*=============================================================================================
-
- /* Compile with ACTGRP(PVS9800)
-
- /*=============================================================================================
- /* Control Specifications
- /*=============================================================================================
-
- H NoMain
- H ExtBinInt
- H Option(*NODEBUGIO)
-
- /*=============================================================================================
- /* File Specifications
- /*=============================================================================================
-
- FOPLUHXR6 IF E K Disk UsrOpn
-
- FOPLANI1 IF E K Disk UsrOpn
-
- /*=============================================================================================
- /* Prototype Specifications
- /*=============================================================================================
-
- /Include QRPGCBSRC,DQUSEC
- /Include QRPGCBSRC,DQMHSNDPM
- /Include QRpgCbSrc,PVS9800
- /Include QRpgCbSrc,MI_CPYBYTE
- /Include QRpgCbSrc,STRING.H
-
- /Define PVRM9800__PROTOTYPES
- /Include QRpgCbSrc,PVRM980000
-
- /*=============================================================================================
- /* Data Specifications
- /*=============================================================================================
-
- /*---------------------------------------------------------------------------------------------
- /* Data Structure Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Array Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Indicator Specifications
- /*---------------------------------------------------------------------------------------------
-
- D globalInit S N
-
- /*---------------------------------------------------------------------------------------------
- /* Standalone Data Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Constant Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*#############################################################################################
- /* retreiveANIWithC#UhUd - Retreive OPPANI record using Cst#, Unit Header/Detail
- /*#############################################################################################
-
- P retreiveANIWithC#UhUd...
- P B Export
-
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- /* Procedure Interface
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- D retreiveANIWithC#UhUd...
- D PI
- D resultBase * Value ANI Records
- D resultFormat 10A Value Result Format
- D customerNumber... Customer Number
- D 7P 0 Value
- D unitHeader 5P 0 Value Unit Header
- D unitDetail 5P 0 Value Unit Detail
- D errorStructure... Error Structure
- D * Value
-
- /*=============================================================================================
- /* Procedure Data Specifications
- /*=============================================================================================
-
- /Include QRPGCBSRC,DUserCh
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Data Structure Specifications
- /*---------------------------------------------------------------------------------------------
-
- D OPPANI DS LikeRec(OPFANI)
- D Based(resultBase)
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Array Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Indicator Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Standalone Data Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Constant Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- /* Procedure Code
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- /Free
-
- ExSr initialize;
-
- Chain (customerNumber : unitHeader : unitDetail : 'A') OPLUHXR6;
-
- If Not %Found(OPLUHXR6);
- SetGt (customerNumber : unitHeader : unitDetail) OPLUHXR6;
- ReadPE (customerNumber : unitHeader : unitDetail) OPLUHXR6;
-
- If %Eof(OPLUHXR6);
- sndPm_Msg_Id = 'PVMF002';
- %SubSt(sndPm_Data : 1 : 21) = 'OPPUHXR';
- %SubSt(sndPm_Data : 22 : 61) = x'0034' +
- 'Customer #: ' + %Trim(%EditC(customerNumber : 'Z')) +
- ', Unit Header: ' + %Trim(%EditC(unitHeader : 'Z')) +
- ', Unit Detail: ' + %Trim(%EditC(unitDetail : 'Z'));
- /Include QRpgCbSrc,CQMhSndPm
- EndIf;
- EndIf;
-
- Chain (UHCST# : UHANI : UHPIND) OPFANI OPPANI;
-
- If Not %Found(OPLANI1);
- sndPm_Msg_Id = 'PVMF002';
- %SubSt(sndPm_Data : 1 : 21) = 'OPPANI';
- %SubSt(sndPm_Data : 22 : 61) = x'0034' +
- 'Customer #: ' + %Trim(%EditC(UHCST# : 'Z')) +
- ', Ani: ' + %Trim(%EditW(UHANI : '0( )& - ')) +
- ', Pin Id: ' + %Trim(%EditC(UHPIND : 'Z'));
- /Include QRpgCbSrc,CQMhSndPm
- EndIf;
-
- ExSr exitProcedure;
-
- //===========================================================================================
- // Initilizing Subroutine
- //===========================================================================================
-
- BegSr initialize;
-
- If Not globalInit;
- globalInit = *ON;
- sndPm_Data_Length = 500;
-
- /Include QRpgCbSrc,ZQMhSndPm
- EndIf;
-
- /Include QRpgCbSrc,ZUserCh
-
- If setJmp(jumpPoint) = 1; // Error Jump Point
- ExSr exitProcedure; // Exit on error
- EndIf;
-
- sndPM_Msg_Type = '*ESCAPE';
-
- userCHConditionHandler = %PAddr('PROVISIONERUSERCH003'); // Condition Handler
- registerConditionHandler(userCHConditionHandler : userCHBase : *OMIT);
-
- userCH.errorBase = errorStructure;
- usec_Base = errorStructure;
- usec_Data_Length = usec_Provided - usec_Avail_Static;
- usec_Data_Base = usec_Base + usec_Avail_Static;
-
- %Subst(usec_Data : 1 : usec_Data_Length) = *BLANKS;
-
- usec_Msg_Id = *BLANKS;
-
- Clear OPPANI;
-
- If Not %Open(OPLANI1);
- Open OPLANI1;
- EndIf;
-
- If Not %Open(OPLUHXR6);
- Open OPLUHXR6;
- EndIf;
-
- EndSr;
-
- //===========================================================================================
- // Exit Procedure
- //===========================================================================================
-
-
- BegSr ExitProcedure;
-
- unRegisterConditionHandler(userCHConditionHandler : *OMIT);
-
- /Include QRpgCbSrc,LUserCh
-
- Return;
-
- EndSr;
-
- /End-Free
-
- P retreiveANIWithC#UhUd...
- P E
-
- /*#############################################################################################
- /* retreiveANIWithC#Uh - Retreive OPPANI record using Cst#, Unit Header
- /*#############################################################################################
-
- P retreiveANIWithC#Uh...
- P B Export
-
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- /* Procedure Interface
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- D retreiveANIWithC#Uh...
- D PI
- D resultBase * Value ANI Records
- D resultFormat 10A Value Result Format
- D customerNumber... Customer Number
- D 7P 0 Value
- D unitHeader 5P 0 Value Unit Header
- D errorStructure... Error Structure
- D * Value
-
- /*=============================================================================================
- /* Procedure Data Specifications
- /*=============================================================================================
-
- /Undefine DUSERCH
- /Include QRPGCBSRC,DUserCh
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Data Structure Specifications
- /*---------------------------------------------------------------------------------------------
-
- D OPPANI DS LikeRec(OPFANI)
- D Based(resultBase)
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Array Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Indicator Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Standalone Data Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*---------------------------------------------------------------------------------------------
- /* Procedure Constant Specifications
- /*---------------------------------------------------------------------------------------------
-
-
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- /* Procedure Code
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- /Free
-
- ExSr initialize;
-
- SetLl (customerNumber : unitHeader) OPLUHXR6;
- ReadE (customerNumber : unitHeader) OPLUHXR6;
-
- DoW Not %Eof(OPLUHXR6) and
- UHSTAT <> 'A';
- ReadE (customerNumber : unitHeader) OPLUHXR6;
- EndDo;
-
- If %Eof(OPLUHXR6);
- SetGt (customerNumber : unitHeader) OPLUHXR6;
- ReadPE (customerNumber : unitHeader) OPLUHXR6;
-
- If %Eof(OPLUHXR6);
- sndPm_Msg_Id = 'PVMF002';
- %SubSt(sndPm_Data : 1 : 21) = 'OPPUHXR';
- %SubSt(sndPm_Data : 22 : 61) = x'002E' +
- 'Customer #: ' + %Trim(%EditC(customerNumber : 'Z')) +
- ', Unit Header: ' + %Trim(%EditC(unitHeader : 'Z'));
- /Include QRpgCbSrc,CQMhSndPm
- EndIf;
- EndIf;
-
- Chain (UHCST# : UHANI : UHPIND) OPFANI OPPANI;
-
- If Not %Found(OPLANI1);
- sndPm_Msg_Id = 'PVMF002';
- %SubSt(sndPm_Data : 1 : 21) = 'OPPANI';
- %SubSt(sndPm_Data : 22 : 61) = x'0034' +
- 'Customer #: ' + %Trim(%EditC(UHCST# : 'Z')) +
- ', Ani: ' + %Trim(%EditW(UHANI : '0( )& - ')) +
- ', Pin Id: ' + %Trim(%EditC(UHPIND : 'Z'));
- /Include QRpgCbSrc,CQMhSndPm
- EndIf;
-
- ExSr exitProcedure;
-
- //===========================================================================================
- // Initilizing Subroutine
- //===========================================================================================
-
- BegSr initialize;
-
- If Not globalInit;
- globalInit = *ON;
- sndPm_Data_Length = 500;
-
- /Include QRpgCbSrc,ZQMhSndPm
- EndIf;
-
- /Undefine ZUSERCH
- /Include QRpgCbSrc,ZUserCh
-
- If setJmp(jumpPoint) = 1; // Error Jump Point
- ExSr exitProcedure; // Exit on error
- EndIf;
-
- sndPM_Msg_Type = '*ESCAPE';
-
- userCHConditionHandler = %PAddr('PROVISIONERUSERCH003'); // Condition Handler
- registerConditionHandler(userCHConditionHandler : userCHBase : *OMIT);
-
- userCH.errorBase = errorStructure;
- usec_Base = errorStructure;
- usec_Data_Length = usec_Provided - usec_Avail_Static;
- usec_Data_Base = usec_Base + usec_Avail_Static;
-
- %Subst(usec_Data : 1 : usec_Data_Length) = *BLANKS;
-
- usec_Msg_Id = *BLANKS;
-
- Clear OPPANI;
-
- If Not %Open(OPLANI1);
- Open OPLANI1;
- EndIf;
-
- If Not %Open(OPLUHXR6);
- Open OPLUHXR6;
- EndIf;
-
- EndSr;
-
- //===========================================================================================
- // Exit Procedure
- //===========================================================================================
-
-
- BegSr ExitProcedure;
-
- unRegisterConditionHandler(userCHConditionHandler : *OMIT);
-
- /Undefine LUSERCH
- /Include QRpgCbSrc,LUserCh
-
- Return;
-
- EndSr;
-
- /End-Free
-
- P retreiveANIWithC#Uh...
- P E
-
- //===========================================================================================
|
|