Sie sind auf Seite 1von 12

CI peoplecode:

/*************************************************************************/
/* BGIv8UPG 06/04/2002 Cliff Miller Begin
*/
/* This is the pcode necessary to instantiate a CI session and pass all */
/* of the necessary data elements to the JOB_DATA component.
*/
/*************************************************************************/
/* VARIABLE DESCRIPTIONS
*/
/* --------------------------------------------------------------------- */
/*
*/
/* API Objects
*/
/* ======================================================================*/
/*
&Session
- Session objects controls security and error
*/
/*
handling.
*/
/*
*/
/*
&CI_JOB_DATA
- Component Interface for JOB_DATA pages
*/
/*
&COLL_JOBCol
- Collection (scroll) for JOB rowset
*/
/*
&COLL_JOBItm
- Individual row for collection JOBCol
*/
/*
&COLL_JOB_JRCol
- Collection (scroll) for JOB_JR rowset
*/
/*
&COLL_JOB_JRItm
- Individual row for collection JOB_JRCol
*/
/*
&COLL_COMPCol
- Collection (scroll) for COMPENSATION_WS rowset*/
/*
&COLL_COMPItm
- Individual row for collection COMPENSATION_WS */
/*
*/
/*
&PSMessages
- Collection (scroll) for error processing.
*/
/*
Contains all error messages generated by CI. */
/*
*/
/* Number Data Types
*/
/* ===================================================================== */
/*
&MaxRowNum
- Row number of the employee's max effdt'd row */
/*
from the PS_JOB collection.
*/
/*
&SQLUpdateEmplRcd - Variable to hold the &HP_JOB_STGE_TBL value
*/
/*
for the EMPL_RCD field for use in the UPDATE */
/*
PS_EMPLOYMENT DML (&SQLUpdate object).
*/
/*
&SQLArrayIDX
- SQL cursor array element index.
*/
/*
*/
/* String Data Types
*/
/* ===================================================================== */
/*
&SQL_Emplid
- Contains the EMPLID from the HP_JOB_STGE_TBL */
/*
working storage record.
*/
/*
&FileDirectory
- Set to file system path for entire AE process.*/
/*
&FileName
- Set to log/error file name for AE process.
*/
/*
&PriorAction
- Variable in prior PAY/MSI fetch -- accepts the*/
/*
PS_JOB.ACTION column value.
*/
/*
&PriorReason
- Variable in prior PAY/MSI fetch -- accepts the*/
/*
PS_JOB.ACTION_REASON column value.
*/
/*
*/
/* Date Data Types
*/

/* ===================================================================== */
/*
&SQL_Effdt
- Set to the ACTION_DT field value from the
*/
/*
HP_JOB_STGE_TBL working storage record.
*/
/*
&NewEffdt
- Set to the EFFDT field value from the
*/
/*
HP_JOB_STGE_TBL working storage object.
*/
/*
&SQLUpdateLastDt
- Variable to hold the &HP_JOB_STGE_TBL value
*/
/*
for the LAST_INCREASE_DT field for use in the */
/*
UPDATE PS_EMPLOYMENT DML (&SQLUpdate object). */
/*
*/
/* File Data Types
*/
/* ===================================================================== */
/*
&ErrorFile
- Error file object (physical data file resides */
/*
on UNIX server).
*/
/*
*/
/* Boolean Data Types
*/
/* ===================================================================== */
/*
&Error
- Switch to allow specific error branching.
*/
/*
*/
/* SQL Data Types
*/
/* ===================================================================== */
/*
&SQLCursor
- The SQL select block to retrieve the data from*/
/*
the HP_JOB_STGE_TBL DB table.
*/
/*
&SQLUpdate
- The DML update block to set the last increase */
/*
date on PS_EMPLOYMENT.
*/
/*
*/
/* Record Data Types
*/
/* ===================================================================== */
/*
&HP_JOB_STGE_TBL
- Virtual representation of the HP_JOB_STGE_TBL */
/*
that acts as working storage for the SQL
*/
/*
object to fetch data into.
*/
/*
&ArrayRecord
- Temporary record to accept SQL cursor data.
*/
/*
*/
/* Array Data Types
*/
/* ===================================================================== */
/*
&SQLArray
- Record array to hold SQL cursor data.
*/
/*************************************************************************/
Local ApiObject &Session, &CI_JOB_DATA, &COLL_JOBCol, &COLL_JOBItm, &COLL_JOB_JRCol, &COLL_JOB_JRItm, &COLL_COMPCol,
&COLL_COMPItm, &PSMessages;
Local
Local
Local
Local
Local
Local
Local
Local

array of Record &SQLArray;


string &SQL_Emplid, &FileName, &FileDirectory, &PriorAction, &PriorReason;
date &NewEffdt, &SQL_Effdt, &SQLUpdateLastDt;
number &MaxRowNum, &SQLUpdateEmplRcd, &SQLArrayIDX;
boolean &Error;
File &ErrorFile;
SQL &SQLCursor, &SQLUpdate;
Record &HP_JOB_STGE_TBL, &ArrayRecord;

/************************************************************************/
/* Function: CheckErrorCodes
*/
/************************************************************************/
Function CheckErrorCodes()
/************************************************************************/
/*Increment the error count variable to be reported in 8100 section
*/
/*This number reflects the total number of rows rejected by the CI.
*/
/************************************************************************/
HP_HP9999_AET.AE_SQLROWS = HP_HP9999_AET.AE_SQLROWS + 1;
&PSMessages = &Session.PSMessages;
/* Write out the offending record */
&ErrorFile.WriteLine(" ");
&ErrorFile.WriteLine(&HP_JOB_STGE_TBL.GetField(Field.EMPLID).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.EMPL_RCD).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.EFFDT).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.EFFSEQ).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.DEPTID).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.JOBCODE).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ACTION).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.ACTION_DT).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ACTION_REASON).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.JOB_ENTRY_DT).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.DEPT_ENTRY_DT).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.FLSA_STATUS).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG1).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG2).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG3).Value |
" " | &HP_JOB_STGE_TBL.GetField(Field.EMPL_TYPE).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.SAL_ADMIN_PLAN).Value
| " " | &HP_JOB_STGE_TBL.GetField(Field.GRADE).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.GRADE_ENTRY_DT).Value |
" " | &HP_JOB_STGE_TBL.GetField(Field.RATING_SCALE).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.REVIEW_RATING).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.COMP_FREQUENCY).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.CHANGE_AMT).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.COMP_RATECD).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.LAST_INCREASE_DT).Value | " " | " FAILED to Process");
&ErrorFile.WriteLine(" ");
&Session.PSMessages.DeleteAll();
End-Function;
/************************************************************************/
/* File Handling
*/
/* -------------------------------------------------------------------- */
/* Absolute file path: /opt/psoft/(dbname)/bgidir/site/tools/logs
*/
/* Mode - A string indicating the manner in which to access the file.
*/
/*
"R" = Read Mode - opens file for reading, starting at begining*/
/*
"W" = Write Mode - opens file for writing and any existing
*/
/*
content in the file is discarded
*/
/*
"A" = Append mode - opens the file for writing, starting at
*/
/*
at the end. Any existing content is saved.
*/
/*
"U" = Update mode - Opens the file for reading or writing,
*/
/*
starting at the end. Any existing content is retained. */

/* Open the error file first and assign the file layout.
*/
/* If the data file exists, open it and assign the file layout to it.
*/
/************************************************************************/
&FileName = HP_HP9999_AET.FILENAME;
&FileDirectory = HP_HP9999_AET.FILE_OUTPUT_DIR;
&File = &FileDirectory | &FileName;
&ErrorFile = GetFile(&File, "A", %FilePath_Absolute);
/************************************************************************/
/* Initialize Variables
*/
/************************************************************************/
&Error = False;
/************************************************************************/
/* Get Current Session
*/
/************************************************************************/
&Session = %Session;
If None(&Session) Then
&ErrorFile.WriteLine("Could not establish CI PeopleSoft session!!");
Exit 1;
End-If;
&Session.PSMessagesMode = 1;
/************************************************************************/
/* Establish the Job Data component interface and set std properties
*/
/* GetHistoryItems - set to false since MODE=INSERT
*/
/* InteractiveMode - set to false for better performance (batch load)
*/
/************************************************************************/
&CI_JOB_DATA = &Session.GetCompIntfc(Component.CI_JOB_DATA);
If &CI_JOB_DATA = Null Then
&ErrorFile.WriteLine("Job Data Component Interface Object Not Established!!");
Exit 1;
Else
&CI_JOB_DATA.InteractiveMode = False;
&CI_JOB_DATA.GetHistoryItems = False;
/***********************************************************************/
/* These 4 blocks of code perform the following function:
*/
/* 1. Establish the SQL cursor to be used for fetching rows from the */
/*
HP_JOB_STGE_TBL table (a SQL meta string).
*/
/* 2. Create a temporary record object to fetch the cursor data into,*/
/*
create an Array to accept the data in the temp. record object, */
/*
and set the Array element index to 1 (first item).
*/
/* 3. Fetch rows into the virtual &ArrayRecord, populate the Array
*/
/*
with data from the record object, and reset the record object */
/*
so that it's ready to accept the next fetch.
*/

/* 4. Close the SQL cursor object.


*/
/***********************************************************************/
&SQLCursor = CreateSQL("%SelectAll(:1)", Record.HP_JOB_STGE_TBL);
&ArrayRecord = CreateRecord(Record.HP_JOB_STGE_TBL);
&SQLArray = CreateArrayRept(&ArrayRecord, 0);
&SQLArrayIDX = 1;
While &SQLCursor.Fetch(&ArrayRecord)
/************************************************************************/
/*Increment the SQL fetch count variable to be reported in 8100 section */
/*This number reflects the total number of rows read in by the array
*/
/*cursor, not necessarily successful CI commits.
*/
/************************************************************************/
HP_HP9999_AET.FETCH_COUNT = HP_HP9999_AET.FETCH_COUNT + 1;
&SQLArray.Push(&ArrayRecord);
&ArrayRecord = CreateRecord(Record.HP_JOB_STGE_TBL);
End-While;
&SQLCursor.Close();
/***************************************************************/
/* Loop through the Record array, populate the HP_JOB_STGE_TBL */
/* record object with the array element at index #.
*/
/***************************************************************/
While &SQLArray.Next(&SQLArrayIDX)
&HP_JOB_STGE_TBL = &SQLArray[&SQLArrayIDX];

/****************************************************************************************/
/* Set Create Key of CI to EMPLID being fetched from HP_JOB_STGE_TBL in 5100 AE section */
/****************************************************************************************/
&CI_JOB_DATA.Cancel();
&CI_JOB_DATA.KEYPROP_EMPLID = &HP_JOB_STGE_TBL.GetField(Field.EMPLID).Value;
If Not &CI_JOB_DATA.Get() Then
CheckErrorCodes();
&Error = True;
End-If;
/****************************************************************/
/* If the employee being processed has already had a PAY/MSI
*/
/* processed for them (in the current pay period), then simply */
/* bypass them by setting the &Error variable to True.
*/

/****************************************************************/
&SQL_Emplid = &HP_JOB_STGE_TBL.GetField(Field.EMPLID).Value;
SQLExec("SELECT J1.ACTION, J1.ACTION_REASON FROM PS_JOB J1 WHERE J1.EMPLID = :1 AND J1.EMPL_RCD = 0 AND J1.EFFDT
= (SELECT MAX(J2.EFFDT) FROM PS_JOB J2 WHERE J2.EMPLID = J1.EMPLID AND J2.EMPL_RCD = J1.EMPL_RCD AND J2.EFFDT BETWEEN
(SYSDATE - 14) AND SYSDATE) AND J1.EFFSEQ = (SELECT MAX(J3.EFFSEQ) FROM PS_JOB J3 WHERE J3.EMPLID = J1.EMPLID AND
J3.EMPL_RCD = J1.EMPL_RCD AND J3.EFFDT = J1.EFFDT)", &SQL_Emplid, &PriorAction, &PriorReason);
If &PriorAction = "PAY" And
&PriorReason = "MSI" Then
&Error = True
End-If;
/****************************************************************/
/* Set the Component Interface Properties that are changing (or */
/* the fields/columns provided by the users in the HP6000 input */
/* file).
*/
/****************************************************************/
If Not &Error Then
/* Set COLL_JOB Collection Field Properties -- Parent: PS_ROOT Collection */
&COLL_JOBCol = &CI_JOB_DATA.COLL_JOB;
&NewEffdt = &HP_JOB_STGE_TBL.GetField(Field.EFFDT).Value;
&MaxRowNum = &COLL_JOBCol.GetEffectiveItemNum(&NewEffdt, 1);
/**************************************************************/
/* Compute EFFSEQ if a row with the same effdt already exists.*/
/**************************************************************/
&SQL_Effdt = &HP_JOB_STGE_TBL.GetField(Field.ACTION_DT).Value;
&SQL_Emplid = &HP_JOB_STGE_TBL.GetField(Field.EMPLID).Value;
SQLExec("SELECT %dateout(J1.EFFDT), MAX(J1.EFFSEQ) FROM PS_JOB J1 WHERE J1.EMPLID = :1 AND J1.EFFDT =
%datein(:2) GROUP BY EFFDT", &SQL_Emplid, &SQL_Effdt, &MaxEffdt, &MaxEffseq);
If &MaxEffdt = &NewEffdt Then
&NewEffSeq = (&MaxEffseq + 1);
&ErrorFile.WriteLine(" ");
&ErrorFile.WriteLine("Job Data Row Exists with Same EFFDT date as this record for: " |
&HP_JOB_STGE_TBL.GetField(Field.EMPLID).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.EFFDT).Value | "
| " ===> " | "New EffSeq will be set to : " | &NewEffSeq);
&ErrorFile.WriteLine(" ");
Else
&NewEffSeq = 0;
End-If;
/****************************************************************/

" | &MaxEffseq

/* Job collection variable assignment done to match the way in */


/* which a user would complete the online pages.
*/
/****************************************************************/
&COLL_JOBItm = &COLL_JOBCol.InsertItem(&MaxRowNum);
&COLL_JOBItm.KEYPROP_EFFDT = &HP_JOB_STGE_TBL.GetField(Field.EFFDT).Value;
&COLL_JOBItm.KEYPROP_EFFSEQ = &NewEffSeq;
&COLL_JOBItm.PROP_ACTION_DT = &HP_JOB_STGE_TBL.GetField(Field.ACTION_DT).Value;
&COLL_JOBItm.PROP_ACTION = &HP_JOB_STGE_TBL.GetField(Field.ACTION).Value;
&COLL_JOBItm.PROP_ACTION_REASON = &HP_JOB_STGE_TBL.GetField(Field.ACTION_REASON).Value;
&COLL_JOBItm.PROP_POSITION_NBR = &HP_JOB_STGE_TBL.GetField(Field.POSITION_NBR).Value;
&COLL_JOBItm.PROP_POSITION_ENTRY_DT = &HP_JOB_STGE_TBL.GetField(Field.POSITION_ENTRY_DT).Value;
&COLL_JOBItm.PROP_DEPTID = &HP_JOB_STGE_TBL.GetField(Field.DEPTID).Value;
&COLL_JOBItm.PROP_DEPT_ENTRY_DT = &HP_JOB_STGE_TBL.GetField(Field.DEPT_ENTRY_DT).Value;
&COLL_JOBItm.PROP_REPORTS_TO = &HP_JOB_STGE_TBL.GetField(Field.REPORTS_TO).Value;
&COLL_JOBItm.PROP_JOBCODE = &HP_JOB_STGE_TBL.GetField(Field.JOBCODE).Value;
&COLL_JOBItm.PROP_JOB_ENTRY_DT = &HP_JOB_STGE_TBL.GetField(Field.JOB_ENTRY_DT).Value;
&COLL_JOBItm.PROP_FLSA_STATUS = &HP_JOB_STGE_TBL.GetField(Field.FLSA_STATUS).Value;
&COLL_JOBItm.PROP_EMPL_TYPE = &HP_JOB_STGE_TBL.GetField(Field.EMPL_TYPE).Value;
&COLL_JOBItm.PROP_SAL_ADMIN_PLAN = &HP_JOB_STGE_TBL.GetField(Field.SAL_ADMIN_PLAN).Value;
&COLL_JOBItm.PROP_GRADE = &HP_JOB_STGE_TBL.GetField(Field.GRADE).Value;
&COLL_JOBItm.PROP_GRADE_ENTRY_DT = &HP_JOB_STGE_TBL.GetField(Field.GRADE_ENTRY_DT).Value;
&COLL_JOBItm.PROP_RATING_SCALE = &HP_JOB_STGE_TBL.GetField(Field.RATING_SCALE).Value;
&COLL_JOBItm.PROP_REVIEW_RATING = &HP_JOB_STGE_TBL.GetField(Field.REVIEW_RATING).Value;
&COLL_JOBItm.PROP_REVIEW_DT = &HP_JOB_STGE_TBL.GetField(Field.REVIEW_DT).Value;
&COLL_JOBItm.PROP_COMP_FREQUENCY = &HP_JOB_STGE_TBL.GetField(Field.COMP_FREQUENCY).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG1 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG1).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG2 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG2).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG3 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG3).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG4 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG4).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG5 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG5).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG6 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG6).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG7 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG7).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG8 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG8).Value;
&COLL_JOBItm.PROP_ELIG_CONFIG9 = &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG9).Value;
&COLL_JOB_JRCol = &COLL_JOBItm.COLL_JOB_JR;
&COLL_JOB_JRItm = &COLL_JOB_JRCol.Item(1);
&COLL_JOB_JRItm.PROP_LASTUPDDTTM = HP_HP9999_AET.DTTM_STAMP;
&COLL_JOB_JRItm.PROP_LASTUPDOPRID = "HP6000AE";
/****************************************************************/
/* Comp collection variable assignment done to match the way in */
/* which a user would complete the online pages.
*/
/****************************************************************/
&COLL_COMPCol = &COLL_JOBItm.COLL_COMPENSATION;
&COLL_COMPItm = &COLL_COMPCol.Item(1);
&COLL_COMPItm.KEYPROP_COMP_RATECD = &HP_JOB_STGE_TBL.GetField(Field.COMP_RATECD).Value;
&COLL_COMPItm.PROP_CHANGE_AMT = &HP_JOB_STGE_TBL.GetField(Field.CHANGE_AMT).Value;

/****************************************/
/* Save Instance of Component Interface */
/****************************************/
If Not &CI_JOB_DATA.Save() Then
CheckErrorCodes();
&Error = True;
End-If;
/*****************************************************************************/
/* Log the record that was just processed if it went through the CI cleanly. */
/*****************************************************************************/
If Not &Error Then
&ErrorFile.WriteLine(&HP_JOB_STGE_TBL.GetField(Field.EMPLID).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.EMPL_RCD).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.EFFDT).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.EFFSEQ).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.DEPTID).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.JOBCODE).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ACTION).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.ACTION_DT).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ACTION_REASON).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.JOB_ENTRY_DT).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.DEPT_ENTRY_DT).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.FLSA_STATUS).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG1).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG2).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.ELIG_CONFIG3).Value |
" " | &HP_JOB_STGE_TBL.GetField(Field.EMPL_TYPE).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.SAL_ADMIN_PLAN).Value
| " " | &HP_JOB_STGE_TBL.GetField(Field.GRADE).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.GRADE_ENTRY_DT).Value |
" " | &HP_JOB_STGE_TBL.GetField(Field.RATING_SCALE).Value | " " |
&HP_JOB_STGE_TBL.GetField(Field.REVIEW_RATING).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.COMP_FREQUENCY).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.CHANGE_AMT).Value | " " | &HP_JOB_STGE_TBL.GetField(Field.COMP_RATECD).Value | "
" | &HP_JOB_STGE_TBL.GetField(Field.LAST_INCREASE_DT).Value | " " | " Processed OK");
/*************************************************************************/
/* Update the Last Increase Date field for the employee being processed. */
/*************************************************************************/
&SQLUpdate = CreateSQL("Update PS_EMPLOYMENT SET LAST_INCREASE_DT = %datein(:1) WHERE EMPLID = :2 AND
EMPL_RCD = :3");
&SQLUpdateEmplRcd = &HP_JOB_STGE_TBL.GetField(Field.EMPL_RCD).Value;
&SQLUpdateLastDt = &HP_JOB_STGE_TBL.GetField(Field.LAST_INCREASE_DT).Value;
&SQLUpdate.Execute(&SQLUpdateLastDt, &SQL_Emplid, &SQLUpdateEmplRcd);
&SQLUpdate.Close();
/*************************************************************************/
/*Increment the total CI processed count variable to be reported in 8100 */
/*This number reflects the total number of rows successfully processed by*/
/*the CI_JOB_DATA comp. interface.
*/
/*************************************************************************/
HP_HP9999_AET.EXECUTE_COUNT = HP_HP9999_AET.EXECUTE_COUNT + 1;

End-If;
End-If;
&SQLArrayIDX = &SQLArrayIDX + 1
End-While;
End-If;
/*************************************************************************/
/* BGIv8UPG 06/04/2002 Cliff Miller End
*/
/*************************************************************************/

Unix Shell Script excerpt for AE execution (batch job):


################################################################################
###
Step0050 : Run Application Engine HP6000AE to load job data activity ###
###
(held in HP_JOB_STGE_TBL) to the PS_JOB and it's assoc.
###
###
child tables via the CI_JOB_DATA component interface.
###
###
Call the utility sysout display script.
###
################################################################################
HRSJOBPGM='App Engine'
HRSJOBSTEP='Step0050'
HRSJOBSTEPDESCR='Run HP6000AE to load activity to job via CI'
HRSJOBSTEPSTART=`date`
HRSJOBSTEPMSG1=' '
HRSJOBSTEPMSG2=' '
HRSJOBSTEPMSG3=' '
HRSJOBRC=0
PROGRAM='HP6000AE' export PROGRAM
OPRID='PRODJOBS' export OPRID
OPRPASS=`cat $HRSJOBPARMDIR/PRODJOBS_PWD.parm` export OPRPASS
RUNCTL='HRS6020W' export RUNCTL
HRSJOBDBNAMEU=$HRSJOBDBNAME export HRSJOBDBNAMEU
typeset -u HRSJOBDBNAMEU
cd $PS_HOME/bin
psae -CT ORACLE -CD $HRSJOBDBNAMEU -CO $OPRID -CP $OPRPASS -R $RUNCTL -I
$PROCESS_INSTANCE -AI $PROGRAM 1>>$HRSJOBLOGFILE 2>&1
sleep 30
. $HRSJOBSCRIPTDIR/HRS9999U

Das könnte Ihnen auch gefallen