Job Conversion

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 66

AE: UPG_BN88

SECTION:HCBNW50

STEP 010 SQL

UPDATE PS_JOB
SET BENEFIT_SYSTEM='OT'
WHERE NOT EXISTS (
SELECT 'X'
FROM PS_EMPLOYMENT A
, PS_BEN_PROG_PARTIC B
WHERE A.EMPLID=PS_JOB.EMPLID
AND A.EMPL_RCD=PS_JOB.EMPL_RCD
AND B.EMPLID=A.EMPLID
AND B.EMPL_RCD=A.BENEFIT_RCD_NBR
AND B.EFFDT <= PS_JOB.EFFDT)

AE: UPG_HR88

SECTION:HCHRI89 ( French Public Sector Actions)

STEP01 PEOPLECODE

UPG_HR_AET.ACTION = "SF2";
UPG_HR_AET.ACTION_DATA_ENTRY = "BON";

SECTION:HCHRI90

STEP 38 SQL

UPDATE PS_JOB
SET ACTION = %Bind(ACTION_DATA_ENTRY)
WHERE ACTION = %Bind(ACTION)

AE: UPG_HC81
SECTION:HCHCG08

STEP01 SQL

UPDATE PS_JOB
SET CURRENCY_CD1 = CURRENCY_CD

STEP02 SQL

UPDATE PS_JOB
SET SETID_LBR_AGRMNT = (
SELECT DISTINCT A.SETID
FROM PS_SET_CNTRL_GROUP A
WHERE A.REC_GROUP_ID = (
SELECT B.REC_GROUP_ID
FROM PS_REC_GROUP_REC B
WHERE B.RECNAME = 'EMPL_CTG')
AND A.SETCNTRLVALUE = PS_JOB.REG_REGION)
WHERE PS_JOB.LABOR_AGREEMENT <> ' '
AND PS_JOB.REG_REGION <> ' '
AND EXISTS (
SELECT 'X'
FROM PS_SET_CNTRL_GROUP C
,PS_REC_GROUP_REC D
WHERE C.SETCNTRLVALUE = PS_JOB.REG_REGION
AND C.REC_GROUP_ID = D.REC_GROUP_ID
AND D.RECNAME = 'EMPL_CTG')

SECTION:HCHCG09

STEP01 Do Select

%Select(UPG_HC_AET.REG_REGION)
SELECT DISTINCT A.REG_REGION FROM PS_JOB A , PS_REG_REGION_TBL B
WHERE B.COUNTRY = 'NLD' AND A.REG_REGION = B.REG_REGION

SECTION:HCHCG091

STEP1 EMPLCL1 SQL

UPDATE PS_JOB
SET EMPL_CLASS = 'T'
WHERE REG_REGION = %Bind(REG_REGION)
AND EMPL_CLASS IN ('I','P')

SECTION:HCHCG091

STEP2 EMPLCL2 SQL

UPDATE PS_JOB
SET EMPL_CLASS = 'R'
WHERE REG_REGION = %Bind(REG_REGION)
AND EMPL_CLASS = 'C'

SECTION:HCHCG091

STEP3 EMPLCL3 SQL


UPDATE PS_JOB
SET EMPL_CLASS = 'O'
WHERE REG_REGION = %Bind(REG_REGION)
AND EMPL_CLASS IN ('A','E')

SECTION:HCHCG10a

STEP03 SQL

UPDATE PS_JOB
SET LDW_OVR = (
SELECT LDW_OVR
FROM PS_UPG_JOB_DT_TMP TMP7
WHERE PS_JOB.EMPLID = TMP7.EMPLID
AND PS_JOB.EMPL_RCD = TMP7.EMPL_RCD
AND PS_JOB.EFFDT = TMP7.EFFDT
AND PS_JOB.EFFSEQ = TMP7.EFFSEQ
AND TMP7.LDW_OVR = 'Y')
WHERE EXISTS(
SELECT 'X'
FROM PS_UPG_JOB_DT_TMP TMP8
WHERE PS_JOB.EMPLID = TMP8.EMPLID
AND PS_JOB.EMPL_RCD = TMP8.EMPL_RCD
AND PS_JOB.EFFDT = TMP8.EFFDT
AND PS_JOB.EFFSEQ = TMP8.EFFSEQ
AND TMP8.LDW_OVR = 'Y')

SECTION:HCHCG52A

STEP03 SQL

UPDATE PS_JOB
SET SUPERVISOR_ID = (
SELECT GJ.REPORTS_TO
FROM PS_GVT_JOB GJ
WHERE GJ.EMPLID = PS_JOB.EMPLID
AND GJ.EMPL_RCD = PS_JOB.EMPL_RCD
AND GJ.EFFDT = PS_JOB.EFFDT
AND GJ.EFFSEQ = PS_JOB.EFFSEQ)
WHERE EXISTS (
SELECT GJ1.SUPERVISOR_ID
FROM PS_GVT_JOB GJ1
WHERE GJ1.EMPLID = PS_JOB.EMPLID
AND GJ1.EMPL_RCD = PS_JOB.EMPL_RCD
AND GJ1.EFFDT = PS_JOB.EFFDT
AND GJ1.EFFSEQ = PS_JOB.EFFSEQ)

SECTION:HCHCG52A

STEP04 SQL

UPDATE PS_JOB
SET REPORTS_TO = (
SELECT GJ.REPORTS_TO
FROM PS_GVT_JOB GJ
WHERE GJ.EMPLID = PS_JOB.EMPLID
AND GJ.EMPL_RCD = PS_JOB.EMPL_RCD
AND GJ.EFFDT = PS_JOB.EFFDT
AND GJ.EFFSEQ = PS_JOB.EFFSEQ)
WHERE EXISTS (
SELECT GJ1.REPORTS_TO
FROM PS_GVT_JOB GJ1
WHERE GJ1.EMPLID = PS_JOB.EMPLID
AND GJ1.EMPL_RCD = PS_JOB.EMPL_RCD
AND GJ1.EFFDT = PS_JOB.EFFDT
AND GJ1.EFFSEQ = PS_JOB.EFFSEQ)

SECTION:HCHCG57

STEP01 SQL

UPDATE PS_JOB
SET MAIN_APPT_NUM_JPN=EMPL_RCD
WHERE APPT_TYPE IN ('0','2')

SECTION:HCPYG10A

STEP01 SQL

%TruncateTable(PS_UPG801JOBTMP)

SECTION:HCPYG10A

STEP01a SQL

%TruncateTable(PS_ALTOT_JOBKEYS)

SECTION:HCPYG10A

STEP02 SQL

%Select(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
SELECT %DateOut(UPG_ALTOT_EFFDT) FROM PS_UPG_PY_ALTOT_DT

SECTION:HCPYG10B

STEP01 Do Select

%Select(UPG_ALTOT_AET.STATE)
SELECT STATE FROM PS_UPG_PY_ALTOT_ST

Peoplecode

UPG_ALTOT_AET.WHERE_CLAUSE1.Value = UPG_ALTOT_AET.WHERE_CLAUSE1.Value | "'" |


UPG_ALTOT_AET.STATE.Value | "',";

SECTION:HCPYG10B

STEP02 Peoplesoft

UPG_ALTOT_AET.WHERE_CLAUSE1.Value = RTrim(UPG_ALTOT_AET.WHERE_CLAUSE1.Value, ",");


SECTION:HCPYG10B

STEP03 SQL

INSERT INTO PS_UPG801JOBTMP (EMPLID


, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID
, SALARY_MATRIX_CD
, RATING_SCALE
, REVIEW_RATING
, REVIEW_DT
, WRKS_CNCL_MEM_GER
, INAIL_CODE
, UNITA_PROD_CD
, ACTION_ITA
, ACTION_REASON_ITA
, WRKS_CNCL_ID_LCL)
SELECT EMPLID
, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, A.TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID
, SALARY_MATRIX_CD
, RATING_SCALE
, REVIEW_RATING
, REVIEW_DT
, WRKS_CNCL_MEM_GER
, INAIL_CODE
, UNITA_PROD_CD
, ACTION_ITA
, ACTION_REASON_ITA
, WRKS_CNCL_ID_LCL
FROM PS_JOB A
WHERE A.FLSA_STATUS = 'N'
AND A.EMPL_STATUS <> 'T'
AND A.TAX_LOCATION_CD <>' '
AND A.TAX_LOCATION_CD IN (
SELECT DISTINCT C.TAX_LOCATION_CD
FROM PS_TAX_LOCATION2 C
, PS_TAX_LOCATION1 D
WHERE C.STATE IN (%Bind(UPG_ALTOT_AET.WHERE_CLAUSE1, NOQUOTES))
AND D.EFF_STATUS = 'A'
AND C.TAX_LOCATION_CD = D.TAX_LOCATION_CD)
AND A.EFFDT = (
SELECT MAX(EFFDT)
FROM PS_JOB E
WHERE E.EMPLID = A.EMPLID
AND E.EFFDT <= %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)))
AND A.EFFSEQ = (
SELECT MAX(EFFSEQ)
FROM PS_JOB F
WHERE F.EMPLID = A.EMPLID
AND F.EFFDT = A.EFFDT
AND F.EMPL_RCD = A.EMPL_RCD)
AND A.HR_STATUS = 'A'
AND A.PER_ORG = 'EMP'

SECTION:HCPYG10C

STEP01 SQL

INSERT INTO PS_JOB (EMPLID


, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID
, SALARY_MATRIX_CD
, RATING_SCALE
, REVIEW_RATING
, REVIEW_DT
, WRKS_CNCL_MEM_GER
, INAIL_CODE
, UNITA_PROD_CD
, ACTION_ITA
, ACTION_REASON_ITA
, WRKS_CNCL_ID_LCL)
SELECT EMPLID
, EMPL_RCD
, %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
, 0
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, 'DTA'
, %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
, ' '
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, 'V'
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, '002'
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, %CurrentDateTimeIn
, 'PPLSOFT'
, SALARY_MATRIX_CD
, RATING_SCALE
, REVIEW_RATING
, REVIEW_DT
, WRKS_CNCL_MEM_GER
, INAIL_CODE
, UNITA_PROD_CD
, ACTION_ITA
, ACTION_REASON_ITA
, WRKS_CNCL_ID_LCL
FROM PS_UPG801JOBTMP
WHERE EFFDT <> %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)

SECTION:HCPYG10C

STEP02 SQL

INSERT INTO PS_JOB (EMPLID


, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID
, SALARY_MATRIX_CD
, RATING_SCALE
, REVIEW_RATING
, REVIEW_DT
, WRKS_CNCL_MEM_GER
, INAIL_CODE
, UNITA_PROD_CD
, ACTION_ITA
, ACTION_REASON_ITA
, WRKS_CNCL_ID_LCL)
SELECT EMPLID
, EMPL_RCD
, %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
, EFFSEQ +1
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, 'DTA'
, %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
, ' '
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, 'V'
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, '002'
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, %CurrentDateTimeIn
, 'PPLSOFT'
, SALARY_MATRIX_CD
, RATING_SCALE
, REVIEW_RATING
, REVIEW_DT
, WRKS_CNCL_MEM_GER
, INAIL_CODE
, UNITA_PROD_CD
, ACTION_ITA
, ACTION_REASON_ITA
, WRKS_CNCL_ID_LCL
FROM PS_UPG801JOBTMP
WHERE EFFDT = %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)

SECTION:HCPYG10C

STEP03 SQL
UPDATE PS_JOB
SET FLSA_STATUS = 'V', LASTUPDDTTM = %CurrentDateTimeIn, LASTUPDOPRID = 'PPLSOFT'

WHERE EFFDT > %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT))


AND FLSA_STATUS = 'N'
AND EMPL_STATUS <> 'T'
AND TAX_LOCATION_CD <>' '
AND TAX_LOCATION_CD IN (
SELECT DISTINCT A.TAX_LOCATION_CD
FROM PS_TAX_LOCATION2 A
, PS_TAX_LOCATION1 B
WHERE A.STATE IN (%Bind(UPG_ALTOT_AET.WHERE_CLAUSE1, NOQUOTES))
AND B.EFF_STATUS = 'A'
AND A.TAX_LOCATION_CD = B.TAX_LOCATION_CD)

AE: UPG_HC88

SECTION: HCHCI11

STEP 01 ACTION SQL

UPDATE PS_JOB
SET APPT_TYPE = '2'
WHERE EXISTS (
SELECT 'X'
FROM PS_FPAEEPOST_TBL
WHERE PS_JOB.EMPLID = PS_FPAEEPOST_TBL.EMPLID
AND PS_JOB.EMPL_RCD = PS_FPAEEPOST_TBL.EMPL_RCD)

SECTION: HCHCI13

STEP 01 ACTION SQL

UPDATE PS_JOB
SET EXPECTED_END_DATE = (
SELECT JR1.EXPECTED_END_DATE
FROM PS_JOB_JR JR1
WHERE PS_JOB.EMPLID = JR1.EMPLID
AND PS_JOB.EMPL_RCD = JR1.EMPL_RCD
AND PS_JOB.EFFDT = JR1.EFFDT
AND PS_JOB.EFFSEQ = JR1.EFFSEQ)

SECTION: HCHCI13

STEP 02 ACTION SQL

UPDATE PS_JOB
SET AUTO_END_FLG = (
SELECT JR2.AUTO_END_FLG
FROM PS_JOB_JR JR2
WHERE PS_JOB.EMPLID = JR2.EMPLID
AND PS_JOB.EMPL_RCD = JR2.EMPL_RCD
AND PS_JOB.EFFDT = JR2.EFFDT
AND PS_JOB.EFFSEQ = JR2.EFFSEQ
AND JR2.AUTO_END_FLG = 'Y')
WHERE EXISTS(
SELECT 'X'
FROM PS_JOB_JR JR3
WHERE PS_JOB.EMPLID = JR3.EMPLID
AND PS_JOB.EMPL_RCD = JR3.EMPL_RCD
AND PS_JOB.EFFDT = JR3.EFFDT
AND PS_JOB.EFFSEQ = JR3.EFFSEQ
AND JR3.AUTO_END_FLG = 'Y')

SECTION: HCHCI13

STEP 04 ACTION SQL

UPDATE PS_JOB
SET LDW_OVR = (
SELECT LDW_OVR
FROM PS_UPG_JOB_DT_TMP TMP7
WHERE PS_JOB.EMPLID = TMP7.EMPLID
AND PS_JOB.EMPL_RCD = TMP7.EMPL_RCD
AND PS_JOB.EFFDT = TMP7.EFFDT
AND PS_JOB.EFFSEQ = TMP7.EFFSEQ
AND TMP7.LDW_OVR = 'Y')
WHERE EXISTS(
SELECT 'X'
FROM PS_UPG_JOB_DT_TMP TMP8
WHERE PS_JOB.EMPLID = TMP8.EMPLID
AND PS_JOB.EMPL_RCD = TMP8.EMPL_RCD
AND PS_JOB.EFFDT = TMP8.EFFDT
AND PS_JOB.EFFSEQ = TMP8.EFFSEQ
AND TMP8.LDW_OVR = 'Y')

SECTION: HCHCI14

STEP 01 ACTION SQL

UPDATE PS_JOB
SET SUPV_LVL_ID = (
SELECT JR.SUPV_LVL_ID
FROM PS_JOB_JR JR
WHERE PS_JOB.EMPLID = JR.EMPLID
AND PS_JOB.EMPL_RCD = JR.EMPL_RCD
AND PS_JOB.EFFDT = JR.EFFDT
AND PS_JOB.EFFSEQ = JR.EFFSEQ)
WHERE EXISTS (
SELECT 'X'
FROM PS_JOB_JR C
WHERE C.EMPLID = PS_JOB.EMPLID
AND C.EMPL_RCD = PS_JOB.EMPL_RCD
AND C.EFFDT = PS_JOB.EFFDT
AND C.EFFSEQ = PS_JOB.EFFSEQ )
SECTION: HCHCW03

STEP 02 ACTION SQL

UPDATE PS_JOB
SET ESTABID = (
SELECT A.ESTABID
FROM PS_LOCATION_TBL A
WHERE A.SETID = PS_JOB.SETID_LOCATION
AND A.LOCATION = PS_JOB.LOCATION
AND A.LOCATION IN (
SELECT B.LOCATION
FROM PS_LOCATION_TBL B
WHERE B.COUNTRY = 'USA')
AND A.EFFDT = (
SELECT MAX(C.EFFDT)
FROM PS_LOCATION_TBL C
WHERE C.SETID = A.SETID
AND C.LOCATION = A.LOCATION
AND C.EFFDT <= PS_JOB.EFFDT))
WHERE ESTABID = ' '
AND EXISTS (
SELECT 'X'
FROM PS_LOCATION_TBL D
WHERE D.COUNTRY = 'USA'
AND PS_JOB.SETID_LOCATION = D.SETID
AND PS_JOB.LOCATION = D.LOCATION
AND D.EFFDT <= PS_JOB.EFFDT)

SECTION: HCHCW04

STEP 01 ACTION SQL

UPDATE PS_JOB
SET BENEFIT_SYSTEM = 'OT'
WHERE PAY_SYSTEM_FLG = 'GP'
AND GP_PAYGROUP NOT IN (
SELECT GP.GP_PAYGROUP
FROM PS_GP_PYGRP GP
, PS_GP_PYENT E
WHERE E.PAY_ENTITY=GP.PAY_ENTITY
AND E.COUNTRY='USA')

SECTION: HCHCW16

STEP 01 ACTION SQL

UPDATE PS_JOB
SET HIRE_DT = (
SELECT A.HIRE_DT
FROM PS_UPG_JOB_DT_TMP A
WHERE A.EMPLID =PS_JOB.EMPLID
AND A.EMPL_RCD =PS_JOB.EMPL_RCD
AND A.EFFDT =PS_JOB.EFFDT
AND A.EFFSEQ =PS_JOB.EFFSEQ), LAST_HIRE_DT = (
SELECT A.LAST_HIRE_DT
FROM PS_UPG_JOB_DT_TMP A
WHERE A.EMPLID =PS_JOB.EMPLID
AND A.EMPL_RCD =PS_JOB.EMPL_RCD
AND A.EFFDT =PS_JOB.EFFDT
AND A.EFFSEQ =PS_JOB.EFFSEQ), ASGN_START_DT = (
SELECT A.ASGN_START_DT
FROM PS_UPG_JOB_DT_TMP A
WHERE A.EMPLID =PS_JOB.EMPLID
AND A.EMPL_RCD =PS_JOB.EMPL_RCD
AND A.EFFDT =PS_JOB.EFFDT
AND A.EFFSEQ =PS_JOB.EFFSEQ), LST_ASGN_START_DT = (
SELECT A.LST_ASGN_START_DT
FROM PS_UPG_JOB_DT_TMP A
WHERE A.EMPLID =PS_JOB.EMPLID
AND A.EMPL_RCD =PS_JOB.EMPL_RCD
AND A.EFFDT =PS_JOB.EFFDT
AND A.EFFSEQ =PS_JOB.EFFSEQ), TERMINATION_DT = (
SELECT A.TERMINATION_DT
FROM PS_UPG_JOB_DT_TMP A
WHERE A.EMPLID =PS_JOB.EMPLID
AND A.EMPL_RCD =PS_JOB.EMPL_RCD
AND A.EFFDT =PS_JOB.EFFDT
AND A.EFFSEQ =PS_JOB.EFFSEQ), ASGN_END_DT = (
SELECT A.ASGN_END_DT
FROM PS_UPG_JOB_DT_TMP A
WHERE A.EMPLID =PS_JOB.EMPLID
AND A.EMPL_RCD =PS_JOB.EMPL_RCD
AND A.EFFDT =PS_JOB.EFFDT
AND A.EFFSEQ =PS_JOB.EFFSEQ), LAST_DATE_WORKED = (
SELECT A.LAST_DATE_WORKED
FROM PS_UPG_JOB_DT_TMP A
WHERE A.EMPLID =PS_JOB.EMPLID
AND A.EMPL_RCD =PS_JOB.EMPL_RCD
AND A.EFFDT =PS_JOB.EFFDT
AND A.EFFSEQ =PS_JOB.EFFSEQ)

SECTION: HCHCW16

STEP 02 ACTION SQL

UPDATE PS_JOB
SET EXPECTED_RETURN_DT = (
SELECT A.EXPECTED_RETURN_DT
FROM PS_EMPLOYMENT A
WHERE A.EMPLID = PS_JOB.EMPLID
AND A.EMPL_RCD = PS_JOB.EMPL_RCD
AND A.EXPECTED_RETURN_DT IS NOT NULL)
WHERE EFFDT = (
SELECT DISTINCT MAX(B.EFFDT)
FROM PS_UPG_JOB_DT_TMP B
WHERE B.EMPLID = PS_JOB.EMPLID
AND B.EMPL_RCD = PS_JOB.EMPL_RCD
AND B.ACTION IN ('LOA' ,'LOF' ,'LTD' ,'LTO' ,'PLA' ,'STD' ,'STO' ,'SUB' ,'SUS')
AND EFFDT < (
SELECT A1.EXPECTED_RETURN_DT
FROM PS_EMPLOYMENT A1
WHERE A1.EMPLID = PS_JOB.EMPLID
AND A1.EMPL_RCD = PS_JOB.EMPL_RCD
AND A1.EXPECTED_RETURN_DT IS NOT NULL))

SECTION: HCHCW16

STEP 05 ACTION SQL

UPDATE PS_JOB
SET TERMINATION_DT = (
SELECT B.TERMINATION_DT
FROM PS_UPG_JOB_DT_TMP B
WHERE PS_JOB.EMPLID = B.EMPLID
AND PS_JOB.EMPL_RCD = B.EMPL_RCD
AND B.EFFDT = (
SELECT MAX(C.EFFDT)
FROM PS_UPG_JOB_DT_TMP C
WHERE C.EMPLID = B.EMPLID
AND C.EMPL_RCD = B.EMPL_RCD
AND C.EFFDT <= PS_JOB.EFFDT
AND C.TERMINATION_DT IS NOT NULL)
AND (B.EFFSEQ = (
SELECT MAX(D.EFFSEQ)
FROM PS_UPG_JOB_DT_TMP D
WHERE D.EMPLID = B.EMPLID
AND D.EMPL_RCD = B.EMPL_RCD
AND D.EFFDT = B.EFFDT
AND D.EFFDT = PS_JOB.EFFDT
AND D.EFFSEQ < PS_JOB.EFFSEQ
AND D.TERMINATION_DT IS NOT NULL)
OR B.EFFSEQ = (
SELECT MAX(E.EFFSEQ)
FROM PS_UPG_JOB_DT_TMP E
WHERE E.EMPLID = B.EMPLID
AND E.EMPL_RCD = B.EMPL_RCD
AND E.EFFDT = B.EFFDT
AND E.EFFDT <> PS_JOB.EFFDT
AND E.TERMINATION_DT IS NOT NULL)))
WHERE TERMINATION_DT IS NULL
AND EMPL_STATUS NOT IN ('A','L','S','P','W')

SECTION: HCHCW16

STEP 06 ACTION SQL

UPDATE PS_JOB
SET LAST_DATE_WORKED = (
SELECT B.LAST_DATE_WORKED
FROM PS_UPG_JOB_DT_TMP B
WHERE PS_JOB.EMPLID = B.EMPLID
AND PS_JOB.EMPL_RCD = B.EMPL_RCD
AND B.EFFDT = (
SELECT MAX(C.EFFDT)
FROM PS_UPG_JOB_DT_TMP C
WHERE C.EMPLID = B.EMPLID
AND C.EMPL_RCD = B.EMPL_RCD
AND C.EFFDT <= PS_JOB.EFFDT
AND C.LAST_DATE_WORKED IS NOT NULL)
AND (B.EFFSEQ = (
SELECT MAX(D.EFFSEQ)
FROM PS_UPG_JOB_DT_TMP D
WHERE D.EMPLID = B.EMPLID
AND D.EMPL_RCD = B.EMPL_RCD
AND D.EFFDT = B.EFFDT
AND D.EFFDT = PS_JOB.EFFDT
AND D.EFFSEQ < PS_JOB.EFFSEQ
AND D.LAST_DATE_WORKED IS NOT NULL)
OR B.EFFSEQ = (
SELECT MAX(E.EFFSEQ)
FROM PS_UPG_JOB_DT_TMP E
WHERE E.EMPLID = B.EMPLID
AND E.EMPL_RCD = B.EMPL_RCD
AND E.EFFDT = B.EFFDT
AND E.EFFDT <> PS_JOB.EFFDT
AND E.LAST_DATE_WORKED IS NOT NULL)))
WHERE LAST_DATE_WORKED IS NULL
AND EMPL_STATUS NOT IN ('A','L','S','P','W')

SECTION: HCHCW16

STEP 07A ACTION Do Select

%SelectInit(EMPLID, EMPL_RCD, EFFDT,


EFFSEQ,LAST_DATE_WORKED,MAR_STATUS_DT,BEGIN_DT)
SELECT A.EMPLID
,A.EMPL_RCD
,%DateOut(A.EFFDT)
,A.EFFSEQ
,%DateOut(B.LAST_DATE_WORKED)
,%DateOut(B.TERMINATION_DT)
,%DateOut(B.ASGN_END_DT)
FROM PS_JOB A
,PS_JOB B
WHERE A.EMPLID=B.EMPLID
AND A.EMPL_RCD=B.EMPL_RCD
AND A.LAST_DATE_WORKED IS NULL
AND A.ACTION IN
('ASC' ,'COM' ,'LOF' ,'PRE' ,'RET' ,'RTS' ,'RWP' ,'SFN' ,'TER' ,'TWB' ,'TWP')
AND B.EFFDT = (
SELECT MAX(C.EFFDT)
FROM PS_JOB C
WHERE C.EMPLID=A.EMPLID
AND C.EMPL_RCD=A.EMPL_RCD
AND C.EFFDT <= A.EFFDT
AND C.ACTION IN
('ASC' ,'COM' ,'LOF' ,'PRE' ,'RET' ,'RTS' ,'RWP' ,'SFN' ,'TER' ,'TWB' ,'TWP')
AND C.LAST_DATE_WORKED IS NOT NULL)
AND B.EFFSEQ = (
SELECT MAX(D.EFFSEQ)
FROM PS_JOB D
WHERE D.EMPLID=A.EMPLID
AND D.EMPL_RCD=A.EMPL_RCD
AND D.EFFDT = B.EFFDT
AND D.ACTION IN
('ASC' ,'COM' ,'LOF' ,'PRE' ,'RET' ,'RTS' ,'RWP' ,'SFN' ,'TER' ,'TWB' ,'TWP')
AND D.LAST_DATE_WORKED IS NOT NULL)
SECTION: HCHCW16

STEP 07A ACTION SQL

UPDATE PS_JOB
SET LAST_DATE_WORKED = %Bind(LAST_DATE_WORKED) , TERMINATION_DT =
%Bind(MAR_STATUS_DT) , ASGN_END_DT = %Bind(BEGIN_DT)
WHERE EMPLID = %Bind(EMPLID)
AND EMPL_RCD = %Bind(EMPL_RCD)
AND EFFDT = %Bind(EFFDT)
AND EFFSEQ = %Bind(EFFSEQ)
AND ACTION IN
('ASC' ,'COM' ,'LOF' ,'PRE' ,'RET' ,'RTS' ,'RWP' ,'SFN' ,'TER' ,'TWB' ,'TWP')

SECTION: HCHCW16

STEP 08 ACTION SQL

UPDATE PS_JOB
SET LDW_OVR = (
SELECT LDW_OVR
FROM PS_UPG_JOB_DT_TMP B
WHERE PS_JOB.EMPLID = B.EMPLID
AND PS_JOB.EMPL_RCD = B.EMPL_RCD
AND B.EFFDT = (
SELECT MAX(EFFDT)
FROM PS_UPG_JOB_DT_TMP C
WHERE C.EMPLID = B.EMPLID
AND C.EMPL_RCD = B.EMPL_RCD
AND C.EFFDT <= PS_JOB.EFFDT
AND C.LDW_OVR = 'Y')
AND ( B.EFFSEQ = (
SELECT MAX(EFFSEQ)
FROM PS_UPG_JOB_DT_TMP D
WHERE D.EMPLID = B.EMPLID
AND D.EMPL_RCD = B.EMPL_RCD
AND D.EFFDT = B.EFFDT
AND D.EFFDT = PS_JOB.EFFDT
AND D.EFFSEQ < PS_JOB.EFFSEQ
AND D.LDW_OVR = 'Y')
OR B.EFFSEQ = (
SELECT MAX(EFFSEQ)
FROM PS_UPG_JOB_DT_TMP E
WHERE E.EMPLID = B.EMPLID
AND E.EMPL_RCD = B.EMPL_RCD
AND E.EFFDT = B.EFFDT
AND E.EFFDT <> PS_JOB.EFFDT
AND E.LDW_OVR = 'Y') ) )
WHERE EMPL_STATUS NOT IN ('A','L','S','P','W')
AND EXISTS(
SELECT 'X'
FROM PS_UPG_JOB_DT_TMP B1
WHERE PS_JOB.EMPLID = B1.EMPLID
AND PS_JOB.EMPL_RCD = B1.EMPL_RCD
AND B1.EFFDT = (
SELECT MAX(EFFDT)
FROM PS_UPG_JOB_DT_TMP C1
WHERE C1.EMPLID = B1.EMPLID
AND C1.EMPL_RCD = B1.EMPL_RCD
AND C1.EFFDT <= PS_JOB.EFFDT
AND C1.LDW_OVR = 'Y')
AND ( B1.EFFSEQ = (
SELECT MAX(EFFSEQ)
FROM PS_UPG_JOB_DT_TMP D1
WHERE D1.EMPLID = B1.EMPLID
AND D1.EMPL_RCD = B1.EMPL_RCD
AND D1.EFFDT = B1.EFFDT
AND D1.EFFDT = PS_JOB.EFFDT
AND D1.EFFSEQ < PS_JOB.EFFSEQ
AND D1.LDW_OVR = 'Y')
OR B1.EFFSEQ = (
SELECT MAX(EFFSEQ)
FROM PS_UPG_JOB_DT_TMP E1
WHERE E1.EMPLID = B1.EMPLID
AND E1.EMPL_RCD = B1.EMPL_RCD
AND E1.EFFDT = B1.EFFDT
AND E1.EFFDT <> PS_JOB.EFFDT
AND E1.LDW_OVR = 'Y' ) ))

SECTION: HCHCW16

STEP 09 ACTION SQL

UPDATE PS_JOB
SET POI_TYPE = (
SELECT W.POI_TYPE
FROM PS_PER_ORG_ASGN W
WHERE PS_JOB.EMPLID = W.EMPLID
AND PS_JOB.EMPL_RCD = W.EMPL_RCD )
WHERE EMPL_RCD IN (
SELECT B.EMPL_RCD
FROM PS_PER_ORG_ASGN B
WHERE PS_JOB.EMPLID = B.EMPLID)

SECTION: HCHCW16

STEP 10 ACTION SQL

UPDATE PS_JOB
SET PER_ORG = (
SELECT W.PER_ORG
FROM PS_PER_ORG_ASGN W
WHERE PS_JOB.EMPLID = W.EMPLID
AND PS_JOB.EMPL_RCD = W.EMPL_RCD )
WHERE EXISTS (
SELECT 'X'
FROM PS_PER_ORG_ASGN B
WHERE PS_JOB.EMPLID = B.EMPLID
AND PS_JOB.EMPL_RCD = B.EMPL_RCD)

SECTION: HCHCW16

STEP 10A ACTION SQL

UPDATE PS_JOB
SET ACTION = 'POI'
WHERE PER_ORG = 'POI'
AND ACTION = 'ADD'

SECTION: HCHCW16

STEP 11 ACTION SQL

UPDATE PS_JOB
SET HR_STATUS = 'I'
WHERE EMPL_STATUS IN ('T','U','V','X','R','D','Q')

SECTION: HCHCW16

STEP 18 ACTION SQL

UPDATE PS_JOB
SET SETID_SUPV_LVL = (
SELECT A.SETID
FROM PS_SET_CNTRL_REC A
WHERE A.RECNAME = 'SUPVSR_LVL_TBL'
AND A.SETCNTRLVALUE = PS_JOB.BUSINESS_UNIT )
WHERE EXISTS (
SELECT 'X'
FROM PS_SET_CNTRL_REC B
WHERE B.RECNAME = 'SUPVSR_LVL_TBL'
AND B.SETCNTRLVALUE = PS_JOB.BUSINESS_UNIT )

SECTION: HCHCW16

STEP 19 ACTION SQL

UPDATE PS_JOB
SET STD_HOURS = 0
WHERE EXISTS (
SELECT 'X'
FROM PS_REG_REGION_TBL A
WHERE A.REG_REGION = PS_JOB.REG_REGION
AND A.COUNTRY IN ('AUS', 'NZL') )
AND STD_HOURS < 1
AND FULL_PART_TIME = 'P'
AND COMP_FREQUENCY = 'H'
AND NOT EXISTS (
SELECT 'X'
FROM PS_COMPENSATION B
WHERE B.EMPLID = PS_JOB.EMPLID
AND B.EMPL_RCD = PS_JOB.EMPL_RCD
AND B.EFFDT = PS_JOB.EFFDT
AND B.EFFSEQ = PS_JOB.EFFSEQ
AND B.COMP_FREQUENCY <> 'H')

SECTION: HCPYI10A

STEP 2 ACTION SQL

%Select(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
SELECT %DateOut(UPG_ALTOT_EFFDT)
FROM PS_UPG_PY_ALTOT_DT

SECTION: HCPYI10B

STEP 1 ACTION Do Select

%Select(UPG_ALTOT_AET.STATE) SELECT STATE FROM PS_UPG_PY_ALTOT_ST

Peoplecode

UPG_ALTOT_AET.WHERE_CLAUSE1.Value = UPG_ALTOT_AET.WHERE_CLAUSE1.Value | "'" |


UPG_ALTOT_AET.STATE.Value | "',";

SECTION: HCPYI10B

STEP 2 ACTION Peoplecode

UPG_ALTOT_AET.WHERE_CLAUSE1.Value = RTrim(UPG_ALTOT_AET.WHERE_CLAUSE1.Value, ",");

SECTION: HCPYI10B

STEP 3 ACTION SQL

INSERT INTO PS_UPG_ALTOTJOBTMP (EMPLID


, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID)
SELECT EMPLID
, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, A.TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID
FROM PS_JOB A
WHERE A.FLSA_STATUS = 'N'
AND A.EMPL_STATUS <> 'T'
AND A.TAX_LOCATION_CD <>' '
AND A.TAX_LOCATION_CD IN (
SELECT DISTINCT C.TAX_LOCATION_CD
FROM PS_TAX_LOCATION2 C
, PS_TAX_LOCATION1 D
WHERE C.STATE IN (%Bind(UPG_ALTOT_AET.WHERE_CLAUSE1, NOQUOTES))
AND D.EFF_STATUS = 'A'
AND C.TAX_LOCATION_CD = D.TAX_LOCATION_CD)
AND A.EFFDT = (
SELECT MAX(EFFDT)
FROM PS_JOB E
WHERE E.EMPLID = A.EMPLID
AND E.EFFDT <= %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)))
AND A.EFFSEQ = (
SELECT MAX(EFFSEQ)
FROM PS_JOB F
WHERE F.EMPLID = A.EMPLID
AND F.EFFDT = A.EFFDT)
AND A.HR_STATUS = 'A'
AND A.PER_ORG = 'EMP'

SECTION: HCPYI10C

STEP 1 ACTION SQL

INSERT INTO PS_JOB (EMPLID


, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID)
SELECT EMPLID
, EMPL_RCD
, %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT))
, 0
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, 'DTA'
, %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT))
, ' '
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, 'V'
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, '002'
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, %CurrentDateTimeIn
, 'PPLSOFT'
FROM PS_UPG_ALTOTJOBTMP
WHERE EFFDT <> %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT))

SECTION: HCPYI10C

STEP 2 ACTION SQL

INSERT INTO PS_JOB (EMPLID


, EMPL_RCD
, EFFDT
, EFFSEQ
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, ACTION
, ACTION_DT
, ACTION_REASON
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, FLSA_STATUS
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, JOB_DATA_SRC_CD
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, LASTUPDDTTM
, LASTUPDOPRID)
SELECT EMPLID
, EMPL_RCD
, %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT))
, EFFSEQ +1
, DEPTID
, JOBCODE
, POSITION_NBR
, APPT_TYPE
, MAIN_APPT_NUM_JPN
, POSITION_OVERRIDE
, POSN_CHANGE_RECORD
, EMPL_STATUS
, 'DTA'
, %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT))
, ' '
, LOCATION
, TAX_LOCATION_CD
, JOB_ENTRY_DT
, DEPT_ENTRY_DT
, POSITION_ENTRY_DT
, SHIFT
, REG_TEMP
, FULL_PART_TIME
, COMPANY
, PAYGROUP
, BAS_GROUP_ID
, ELIG_CONFIG1
, ELIG_CONFIG2
, ELIG_CONFIG3
, ELIG_CONFIG4
, ELIG_CONFIG5
, ELIG_CONFIG6
, ELIG_CONFIG7
, ELIG_CONFIG8
, ELIG_CONFIG9
, BEN_STATUS
, BAS_ACTION
, COBRA_ACTION
, EMPL_TYPE
, HOLIDAY_SCHEDULE
, STD_HOURS
, STD_HRS_FREQUENCY
, OFFICER_CD
, EMPL_CLASS
, SAL_ADMIN_PLAN
, GRADE
, GRADE_ENTRY_DT
, STEP
, STEP_ENTRY_DT
, GL_PAY_TYPE
, ACCT_CD
, EARNS_DIST_TYPE
, COMP_FREQUENCY
, COMPRATE
, CHANGE_AMT
, CHANGE_PCT
, ANNUAL_RT
, MONTHLY_RT
, DAILY_RT
, HOURLY_RT
, ANNL_BENEF_BASE_RT
, SHIFT_RT
, SHIFT_FACTOR
, CURRENCY_CD
, BUSINESS_UNIT
, SETID_DEPT
, SETID_JOBCODE
, SETID_LOCATION
, SETID_SALARY
, REG_REGION
, DIRECTLY_TIPPED
, 'V'
, EEO_CLASS
, FUNCTION_CD
, TARIFF_GER
, TARIFF_AREA_GER
, PERFORM_GROUP_GER
, LABOR_TYPE_GER
, SPK_COMM_ID_GER
, HOURLY_RT_FRA
, ACCDNT_CD_FRA
, VALUE_1_FRA
, VALUE_2_FRA
, VALUE_3_FRA
, VALUE_4_FRA
, VALUE_5_FRA
, CTG_RATE
, PAID_HOURS
, PAID_FTE
, PAID_HRS_FREQUENCY
, GVT_EFFDT
, GVT_EFFDT_PROPOSED
, GVT_TRANS_NBR
, GVT_TRANS_NBR_SEQ
, GVT_WIP_STATUS
, GVT_STATUS_TYPE
, GVT_NOA_CODE
, GVT_LEG_AUTH_1
, GVT_PAR_AUTH_D1
, GVT_PAR_AUTH_D1_2
, GVT_LEG_AUTH_2
, GVT_PAR_AUTH_D2
, GVT_PAR_AUTH_D2_2
, GVT_PAR_NTE_DATE
, GVT_WORK_SCHED
, GVT_SUB_AGENCY
, GVT_ELIG_FEHB
, GVT_FEHB_DT
, GVT_PAY_RATE_DETER
, GVT_STEP
, GVT_RTND_PAY_PLAN
, GVT_RTND_SAL_PLAN
, GVT_RTND_GRADE
, GVT_RTND_STEP
, GVT_RTND_GVT_STEP
, GVT_PAY_BASIS
, GVT_COMPRATE
, GVT_LOCALITY_ADJ
, GVT_BIWEEKLY_RT
, GVT_DAILY_RT
, GVT_HRLY_RT_NO_LOC
, GVT_DLY_RT_NO_LOC
, GVT_BW_RT_NO_LOC
, GVT_MNLY_RT_NO_LOC
, GVT_ANNL_RT_NO_LOC
, GVT_XFER_FROM_AGCY
, GVT_XFER_TO_AGCY
, GVT_RETIRE_PLAN
, GVT_ANN_IND
, GVT_FEGLI
, GVT_FEGLI_LIVING
, GVT_LIVING_AMT
, GVT_ANNUITY_OFFSET
, GVT_CSRS_FROZN_SVC
, GVT_PREV_RET_COVRG
, GVT_FERS_COVERAGE
, GVT_TYPE_OF_APPT
, GVT_POI
, GVT_POSN_OCCUPIED
, GVT_CONT_EMPLID
, GVT_ROUTE_NEXT
, GVT_CHANGE_FLAG
, GVT_TSP_UPD_IND
, GVT_PI_UPD_IND
, GVT_SF52_NBR
, GVT_S113G_CEILING
, GVT_LEO_POSITION
, GVT_ANNUIT_COM_DT
, GVT_BASIC_LIFE_RED
, GVT_DED_PRORT_DT
, GVT_FEGLI_BASC_PCT
, GVT_FEGLI_OPT_PCT
, GVT_FEHB_PCT
, GVT_RETRO_FLAG
, GVT_RETRO_DED_FLAG
, GVT_RETRO_JOB_FLAG
, GVT_RETRO_BSE_FLAG
, GVT_OTH_PAY_CHG
, GVT_DETL_POSN_NBR
, ANNL_BEN_BASE_OVRD
, BENEFIT_PROGRAM
, UPDATE_PAYROLL
, GVT_PAY_PLAN
, GVT_PAY_FLAG
, GVT_NID_CHANGE
, UNION_FULL_PART
, UNION_POS
, MATRICULA_NBR
, SOC_SEC_RISK_CODE
, UNION_FEE_AMOUNT
, UNION_FEE_START_DT
, UNION_FEE_END_DT
, EXEMPT_JOB_LBR
, EXEMPT_HOURS_MONTH
, WRKS_CNCL_FUNCTION
, INTERCTR_WRKS_CNCL
, CURRENCY_CD1
, PAY_UNION_FEE
, UNION_CD
, BARG_UNIT
, UNION_SENIORITY_DT
, ENTRY_DATE
, LABOR_AGREEMENT
, EMPL_CTG
, EMPL_CTG_L1
, EMPL_CTG_L2
, SETID_LBR_AGRMNT
, GP_PAYGROUP
, GP_DFLT_ELIG_GRP
, GP_ELIG_GRP
, GP_DFLT_CURRTTYP
, CUR_RT_TYPE
, GP_DFLT_EXRTDT
, GP_ASOF_DT_EXG_RT
, ADDS_TO_FTE_ACTUAL
, CLASS_INDC
, ENCUMB_OVERRIDE
, FICA_STATUS_EE
, FTE
, PRORATE_CNT_AMT
, PAY_SYSTEM_FLG
, BORDER_WALKER
, LUMP_SUM_PAY
, CONTRACT_NUM
, JOB_INDICATOR
, WRKS_CNCL_ROLE_CHE
, BENEFIT_SYSTEM
, WORK_DAY_HOURS
, SUPERVISOR_ID
, REPORTS_TO
, FORCE_PUBLISH
, '002'
, ESTABID
, PER_ORG
, HR_STATUS
, WPP_STOP_FLAG
, LABOR_FACILITY_ID
, LBR_FAC_ENTRY_DT
, LAYOFF_EXEMPT_FLAG
, LAYOFF_EXEMPT_RSN
, SUPV_LVL_ID
, SETID_SUPV_LVL
, ABSENCE_SYSTEM_CD
, POI_TYPE
, HIRE_DT
, LAST_HIRE_DT
, TERMINATION_DT
, ASGN_START_DT
, LST_ASGN_START_DT
, ASGN_END_DT
, LDW_OVR
, LAST_DATE_WORKED
, EXPECTED_RETURN_DT
, EXPECTED_END_DATE
, AUTO_END_FLG
, %CurrentDateTimeIn
, 'PPLSOFT'
FROM PS_UPG_ALTOTJOBTMP
WHERE EFFDT = %DateIn(%Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT))

SECTION: HCPYW10K

STEP 020 ACTION Do Select

%SelectInit(UPG_HC_AET.EMPLID, UPG_HC_AET.POSITION_NBR)
SELECT A.EMPLID
, B.POSITION_NBR
FROM PS_JOB A
,PS_POSITION_DATA B
WHERE A.POSITION_NBR = B.POSITION_NBR
AND A.FLSA_STATUS = 'V'
AND A.EFFDT = %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)

SECTION: HCPYW10M

STEP 010 ACTION Do When

%SelectInit(UPG_HC_AET.AE_TEST_FLAG)
SELECT 'X'
FROM PS_INSTALLATION
WHERE POSITION_MGMT = 'F'

SECTION: HCPYW10M

STEP 010 ACTION SQL

UPDATE PS_JOB
SET ACTION = 'POS', ACTION_REASON = 'UPD'
WHERE EMPLID = %Bind(UPG_HC_AET.EMPLID)
AND POSITION_NBR = %Bind(UPG_HC_AET.POSITION_NBR)
AND EFFDT = %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
AND FLSA_STATUS = 'V'

SECTION: HCPYW10M

STEP 020 ACTION Do When

%SelectInit(UPG_HC_AET.AE_TEST_FLAG)
SELECT 'X'
FROM PS_INSTALLATION
WHERE POSITION_MGMT = 'P'
STEP 020 ACTION Peoplecode

UPG_HC_AET.SEQ_NBR = UPG_HC_AET.SEQ_NBR + 1;

STEP 020 ACTION SQL

UPDATE PS_JOB
SET POSITION_OVERRIDE = 'Y'
WHERE EMPLID = %Bind(UPG_HC_AET.EMPLID)
AND POSITION_NBR = %Bind(UPG_HC_AET.POSITION_NBR)
AND EFFDT >= %Bind(UPG_ALTOT_AET.UPG_ALTOT_EFFDT)
AND FLSA_STATUS = 'V'

You might also like