TR - Sample Report

The following common library program: HIREDATE reports the employees original hire date into their current classification.

 

EX TR

DEFINE FILE TR ADD

-* TO LATER DETERMINE IF CURRENT CLASSIFICATION IS ACTIVE:

-* SEPCODE VALUE FOR FIRST TRANSACTION WITHIN PSN SEQ IS

-* COPIED INTO ALL TRANSACTIONS WITHIN EACH PSN SEQ.

SEPCODE/A1 =IF TR:SSA EQ LAST TR:SSA AND

TR:PSNSEQ EQ LAST TR:PSNSEQ

THEN LAST SEPCODE ELSE TR:SEPCODE;

END

TABLE FILE TR

WHERE TR:STATUS EQ '1'

WHERE RECORDLIMIT EQ 100

-* TO GET THE EARLIEST EFF DATE WITHIN CLASS SELECT THE

-* MINIMUN VALUE FOR EFF DATE. NOTE, THE EARLIST EFF DATE

-* FOR A ACTIVE POSITION MAY BE IN ANY PSN SEQ, ACTIVE OR

-* NOT. THE EARLIST EFF DATE WE ARE LOOKING FOR MAY BE

-* ANYWHERE FROM THE FIRST SEGMENT TO THE LAST SEGMENT.

-* TO LATER DETERMINE IF THE CLASS IS CURRENTLY ACTIVE,

-* TAKE THE MINIMUN SEPCODE VALUE.

SUM MIN.TR:EFFYMD MIN.SEPCODE

BY TR:SSA

BY TR:CLASS

ON TABLE HOLD

END

-*

TABLE FILE HOLD

HEADING CENTER

"THE CALIFORNIA STATE UNIVERSITY"

"FIRST HIRE DATE ACTIVE/ONLEAVE EMPLOYEE CLASSIFICATIONS"

"COMMON FOCEXEC: HIREDATE </1"

PRINT TR:SSA AS 'SOCIAL SECURITY NUMBER'

TR:CLASS AS 'CLASS CODE'

TR:EFFYMD AS 'FIRST HIRE DATE'

WHERE SEPCODE EQ '1' OR '2'

-* TO SELECT ONLY CURRENT ACTIVE AND ON LEAVE POSITIONS

END

 

The following is only an excerpt from the actual report.

 

           THE CALIFORNIA STATE UNIVERSITY

FIRST HIRE DATE ACTIVE/ONLEAVE EMPLOYEE CLASSIFICATIONS

               COMMON FOCEXEC: HIREDATE

 

SOCIAL SECURITY NUMBER CLASS CODE FIRST HIRE DATE

---------------------- ---------- ---------------

111-11-1111            2360       1976/11/02

222-22-2222            2360       1978/09/18

333-33-3333            2399       1997/08/25