Workforce Int MNGR v8 Advanced Int Prog (Practice)
Workforce Int MNGR v8 Advanced Int Prog (Practice)
Practice Exercises
Revision A
P/N 4704876-001
The information in this document is subject to change without notice and should not be construed as a commitment by Kronos Incorporated.
Kronos Incorporated assumes no responsibility for any errors that may appear in this manual. This document is for the use of the intended
recipient, and it may not be reproduced in whole or in part or used for any other purpose than that for which it was provided without the prior
written permission of Kronos Incorporated. Copyright, Kronos Incorporated or a related company, 2015. All rights reserved.
Altitude, Cambridge Clock, CardSaver, Datakeeper, Datakeeper Central, eForce, Gatekeeper, Gatekeeper Central, Imagekeeper, Jobkeeper
Central, Keep.Trac, Kronos, Kronos Touch ID, Kronos InTouch, the Kronos logo, Kronos Workforce Ready, My Genies, PeoplePlanner,
PeoplePlanner & Design, Schedule Manager & Design, ShopTrac, ShopTrac Pro, StarComm, StarPort, StarSaver, StarTimer,Timekeeper,
Timekeeper Central, TimeMaker, Visionware, Workforce Accruals, Workforce Central, Workforce Decisions, Workforce Express, Workforce
Genie, and Workforce TeleTime are registered trademarks of Kronos Incorporated or a related company. Altitude Dream, Altitude Pairing,
Altitude PBS, Comm.Mgr, CommLink, DKC/Datalink, FasTrack, HR and Payroll Answerforce, HyperFind, Improving the Performance of
People and Business, Kronos 4500, Kronos 4500 Touch ID, Kronos e-Central, Kronos KnowledgePass, KronosWorks, KVC On Demand,
Labor Plus, Momentum, Momentum Essentials, Momentum Online, Schedule Assistant, Smart Scheduler, Smart View, StartLabor, Start
Quality, Start WIP, Starter Series, Timekeeper Decisions, Timekeeper Web, VisionPlus, Winstar Elite, WIP Plus, Workforce Activities,
Workforce Attendance, Workforce Collaboration, Workforce Connect, Workforce Employee, Workforce HR, Workforce Leave, Workforce
Manager, Workforce Mobile, Workforce MobileTime, Workforce Payroll, Workforce Record Manager, Workforce Recruiter, Workforce
Scheduler, Workforce Scheduler with Optimization, Workforce Smart Scheduler, Workforce Tax Filing, Workforce Timekeeper, Workforce
Analytics, Workforce Acquisition, Workforce View, Workforce Absence Manager, Workforce Device Manager, Workforce Integration Manager,
Workforce Forecast Manager, and Workforce Operations Planner, Workforce Task Management, and Workforce TeleTime IP are
trademarks of Kronos Incorporated or a related company.
IBM, eServer, and iSeries are trademarks of International Business Machines Corporation. StandardsPro® is a registered trademark of H.B.
Maynard and Company, Inc. Vortex and Vortex Mobile Scheduler Connect are trademarks of Vortex Connect. Citrix is a registered trademark
of Citrix. All other product and company names mentioned are for identification purposes only, and may be trademarks of their respective
owners.
When using and applying the information generated by Kronos products, customers should ensure that they comply with the applicable
requirements of federal and state law, such as the Fair Labor Standards Act. Nothing in this Guide shall be construed as an assurance or
guaranty that Kronos products comply with any such laws.
These training materials are provided for general educational purposes and are not intended to convey legal, accounting, or regulatory
compliance advice. Such advice can only be obtained through your own attorney, certified public accountant or other qualified professional,
with full knowledge of your organization's particular operations, circumstances and policies. Readers are encouraged to consult with
appropriate professional advisors concerning their individual circumstances before making decisions affecting their business operations. Last
updated March 18, 2015.
Practice Exercises
Data Description
Element
F1 The original 9 character string without using extra field parsing.
F2 The original 9 character string using extra field parsing to begin at offset
= 0 and length = 9.
The output from this field should be identical to F1. It is simply done a
different way.
F3 The first character of the field. Use extra field parsing to accomplish the
task.
F4 The second character of the field. Transfer only the first 5 characters
and extract the second character using extra field parsing.
F5 Transfer the first 9 characters of the field, but use extra field parsing to
begin at offset = 1 and length = 0.
F6 Transfer the first 5 characters of the field, but use extra field parsing to
begin at offset = 5 and length = 1.
1. What difference did you see between data element F1 and F2?
_______________________________________________
2. What does the length of 0 in data element F5 accomplish?
_______________________________________________
Alternate solution
For the last practice above, You could use the string function Length to return the
length of the last name.
Use the function within a calculation to determine how many characters you need
to add to the string. You can then use the Add Character function to add the
appropriate number of characters.
Alternate solution
For the last practice above, You could use the string function Length to return the
length of the last name.
Use the function within a calculation to determine how many characters you need
to add to the string. You can then use the Add Character function to add the
appropriate number of characters.
B. Modify the link to output the second part of the field as an additional
data element. Hint: Use variables for the individual pieces.
A sample of the output is shown below:
ABCD-1234,ABCD,1234
EFGH-7890,EFGH,7890
JKLMN-8989,JKLMN,8989
PQRST-456,PQRST,456
C. Modify the link to concatenate the two substrings by replacing the ‘-’
with a ‘/’. Sample output is shown below. Hint: Use variables for the
individual pieces.
ABCD-1234,ABCD,1234,ABCD/1234
EFGH-7890,EFGH,7890,EFGH/7890
D. Extra Challenge! Modify the link to trap for errors if the dash character is
not in position 5 or position 6. Test your modifications with the file
TextIn-1A.TXT as the source. Solution: TextManip1-A.KNX
Data Description
Element
Orig The original data
First The part of the original data that occurs before the ampersand (&)
Second The part of the original data that occurs after the ampersand (&)
Data Description
Element
Orig The first field in the source file
Work order The part of the original data that occurs before the caret (^)
Part number The part of the original data that occurs after the caret (^)
Quantity The second field in the source file
Note
Practices “A” and “B” are not typical source files because of the
varying date formats. Typical sources have consistent formats for any
given date field.
A. Create a link to read the file dates.TXT. This is comma delimited file with
a single field containing dates in several formats. Some of the formats
are not valid so do not expect the results to be valid. Create a link that
reads the original date string and displays it in the manner shown in the
table. Do not use variables.
Solution: DateTest1.KNX.
1. Which combinations of data type and actions give invalid results for valid
dates?
_______________________________________________
B. Create a link that reads the comma delimited text file, dates-In-2.TXT and
use variables to extract date pieces. This file contains 2 fields: the first
is a date string, the second is a description of the validity of the value of
the first item. Create a link that has the following output. Solution:
DateTest2.KNX.
1. Was the field Date as c formatted correctly? Did it check for invalid dates?
_______________________________________________
C. Create a link that reads the text file, dates-In-6.TXT and uses variables to
extract date pieces. This file contains only one field: a date string in
mm/dd/yyyy format. Create a link that has the following output.
Solution: DateTest3.KNX.
Create variables that extract the three parts of the date. All of them are
evaluated on a per record interval and are a Date/Time type.
Variable Comment
:Day Format as “dd”
:Month Format as “mm”
:Year Format as “yyyy”
1. Were correct values for Day, Month, and Year returned on the dates?
_______________________________________________
D. Add a variable for the day of the week and include it in your output.
Solution: DateTest3.KNX.
1. What values were returned on the dates?
_______________________________________________
E. Extra challenge! Add a field that indicates the number of the day of the
week. For example Sun = 1, Mon = 2, … Solution: DateTest3.KNX.
A. Create a link that reads the comma delimited file Dates-In-3.TXT. The
file’s format is described in the header record. Create a fixed length
output consisting of the following fields.
Data Comments
Element
Original data The original contents of the first field formatted as text
Year only The original contents of the first field formatted as Date/Time,
specifier of “yyyy”. Action is Transfer from source.
A. Create a calculation that changes the default to interpret any year less
than 50 to the 21st century. For example, 01/01/49 is interpreted as
01/01/2049. Add it to the link you just created that read the year. Use
yearlist.TXT as your source. A description of the data elements is
displayed below with a sample of output. Solution:
YearTestSolution.KNX.
Data Comments
Element
Original date The original contents of the first field formatted as text
Year only The original contents of the first field formatted as Date/Time,
specifier of “yyyy”. Action is Transfer from source.
Corrected Year The value of the corrected year formatted as text.
14 Jan 27,2027,2027
14 Jan 28,2028,2028
14 Jan 29,2029,2029
14 Jan 30,1930,2030
14 Jan 31,1931,2031
B. Extra challenge! Modify the link so that the division point (50) is
assigned by a variable with a preprocess execution interval and a static
text action.
Solution: YearTestSolution-A.KNX.
C. Extra Challenge! Modify the link so that the division point is input by the
user in response to a prompt.
A. Create a calculation that subtracts the Hours worked date from the
current date and displays the difference. Use WFC for your source data.
For a greater variety of dates use the Daily Records option. The output
should be fixed length text. A description of the data elements is shown
below. Solution: DateMath4.KNX.
A. Create a link that expresses the employee’s hire date in Julian format.
The link should include the employee’s name and hire date expressed in
both mm/dd/yyyy format and DDD/yyyy format. Use the Workforce
Central database supplied by the instructor. The output should be fixed
length. Solution: Julian2.KNX.
B. Create a link that reads the file JulianDatesIn.TXT and convert the dates
to mm/dd/yyyy format using the alternate solution of adding the days to
the end date of the previous year. The output is described below.
Solution: Julian1-A.KNX.
001/2001 01/01/2001
032/2001 02/01/2001
111/2001 04/21/2001
365/1949 12/31/1949
C. Determine if the year is a leap year. Use the table
LeapTableOut.tbl. Solution: Julian1-A.KNX.
D. Extra Challenge! Create a link that reads the file JulianDatesIn-Alt.TXT
and converts the dates to mm/dd/yyyy format. The dates in the source
file have a variable-length day format. Solution: Wildcard2.KNX.
1/2001 01/01/2001
32/2001 02/01/2001
111/2001 04/21/2001
E. Extra Challenge! Create a link that reads the comma delimited file
CenturyFormatIn.TXT. The file contains the employee name and the hire
date expressed as “101365”. The first character represents the century:
0 is 1900, 1 is 2000, etc. The next two digits represent the year within the
century. The last 3 digits represent the Julian day in the year. The link
should output the name and the hire date expressed as mm/dd/yyyy.
Solution: CenturySolution.KNX.
B. Add variables to parse the hours and minutes individually from the
string. Add data elements to the output to display these fields. Solution:
TimeTest1214-B.KNX.
A. Create a link that reads the start time and duration from the fixed length
text file DateTimeMath2.TXT. Examine the file to determine the location
of the various fields. The output is described below. Solution:
TimeMath6.KNX.
B. Extra Challenge! Create a link to read the fixed length text file
DateTimeMath3.TXT. The file layout is given below.
The output is fixed length text. All output fields are formatted as text.
The link should output the following fields. Solution:
DateTimeMath3.KNX.
A. Create a link that reads the single field comma delimited file
YearDates1.TXT and associates a week number with each date. At a
minimum, include the source date, the Julian day number and the week
number. Additional outputs of interim calculation values may be helpful
in debugging. Solution:WeekNum1.KNX. A sample of the minimum
output is shown below:
1/1/2009,001,1
1/2/2009,002,1
1/3/2009,003,1
1/4/2009,004,1
1/5/2009,005,1
1/6/2009,006,1
1/7/2009,007,1
1/8/2009,008,2
1/9/2009,009,2
B. Extra challenge! Use the source file WeekNumSource.TXT and create a
link that calculates the week number based on the assumptions that the
first week starts on the week that contains at least one day. Solution:
WeekNum2.KNX.
C. Extra challenge! Use the source file WeekNumSource.TXT and create a
link that calculates the week number based on the assumptions that the
first week starts on the week that contains at least four days. Solution:
WeekNum3.KNX.
D. Extra challenge! Use the source file WeekNumSource.TXT and create a
link that calculates the week number based on the assumptions that the
first week starts on the week that contains seven days. Weeks with
fewer than seven days are considered week 0.
B. Create a link to populate the new table and include preopen functions to
drop and create the table. You can copy the SQL you just wrote for the
SQL statements. Solution: LoadTemp1.KNX.
C. Complete the link to populate the new table with all of the rows in
PayrollSource.TXT except those where the pay code is one of the
summary pay codes. Call the link LoadTemp1. Hint: There is more than
one way to eliminate the summary pay categories.
1. How did you eliminate the summary pay codes?
_______________________________________________
2. Can you think of another way to accomplish the same task?
_______________________________________________
D. Disable the drop and create functions and run the LoadTemp1 link two
or three times in succession without clearing the data.
1. What happens?
_______________________________________________
E. Enable the drop and create functions and run the link again.
F. Create a SQL query that sums the hours by paycat. Include all of the
columns. Test the query using the SQL query tool.
G. Create a link that outputs the following for each employee: empid,
paycat, sum of the hours for the paycat. Make the output text, comma
delimited. Solution: PayrollOut.KNX.
H. Combine the links into a single interface file. Run the interface as a test.
Solution: SQLPractice.KNI.
Let me: Change the sort order for a Workforce Central source
In this practice you will modify the SQL for the employee information to change
the default sort order.
A. Create a new link to extract information from Workforce Central for the
previous pay period. Enable the Use SQL for Employee List option and
change the sort order to be by last name. Include the following fields in
your fixed length text file output. Solution: WTKUseSQL-A.KNX.
A. Add another field which is the date the employee joined the 401K
program. Include it in the output. Use a special lookup table to
accomplish the task. The value comes from the
vp_personcustdata.customdatetime column and is identified by the
customdatetypeid field having a value of 1. Additionally, include the
message “Not in 401K plan” if the date is blank. Solution:
CustomData4Solution.KNX.
B. Open WFC_Extract-B.KNX.
C. Examine the various parts of the link described by the instructor.
D. Modify the link to use the database connection you defined in Step A.
E. Run the second link and use the SQL query tool to examine the
temporary table.
303,303,
28,28,303
25,25,28
Use the following SQL statement as your source; the Distinct modifier
ensures that you only get each employee ID once so it is easier to track
changes. Solution: Tracking1.KNX.
Select distinct(personnum) from vp_totals
B. Write a link to track only the current and previous values of the
employee ID in the comma delimited file Practice1BIn.TXT. The source
file has three fields: employee ID, labor level, and pay category. Use a
Boolean to check if there has been a change in the employee ID only. If
the ID has changed, output the static text “New ID”, otherwise output
“Same ID”. Solution: Practice1B.KNX.
1,0,New ID
1,1,Same ID
1,1,Same ID
1,1,Same ID
1,1,Same ID
2,1,New ID
2,2,Same ID
C. Extra Challenge! Add a variable to track and output the ID from the next
oldest record. This means that you will have three variables and four
output fields. Sample output is shown below. This applies to practice
‘A’. Solution: Tracking2.KNX.
303,303,,
28,28,303,
25,25,28,303
45,45,25,28
A. Write a link to track the combined change in ID and labor level in the
comma delimited file Practice1BIn.TXT. The source file has three fields:
employee ID, labor level, and pay category. As before, use Booleans to
check for the change. Output a message that indicates whether or not a
change of the combination of employee ID and labor level has taken
place. Use either method discussed. Solution: Practice1C.KNX.
1,A,New combined
1,A,Combined Same
1,B,New combined
1,B,Combined Same
1,C,New combined
2,A,New combined
2,B,New combined
A. Create a link that extracts the employee ID, pay code, and hours from
the Payroll table in the HGPayroll database. Include a counter for each
pay code that increments until the employee ID changes. Pay codes can
be repeated in the output. A sample of typical output is shown below.
Hint: Only one link is needed. Solution: Counter_example.KNX.
Field Description
Employee ID The employee ID
Date The date of the shift segment
Identifier Contains static text like “BR1” to identify the record
Field Description
Start time Start time from the file
Duration Duration from the file
Labor level Concatenated labor level information
Identifier Contains static text like “BR1” to identify the record
Variable Description
Employee ID Transfer from the source.
Date Transfer from the source.
Start time Transfer from the source.
Duration Transfer from the source.
Labor level data Calculation to concatenate the five field with slashes.
Example: 101/201/301/401/501
Previous employee ID Used to track changes. Do in a calculation.
Current employee ID Used to track changes.
Previous date Used to track changes. Do in a calculation.
Current date Used to track changes.
Same employee ID? Calculation that returns either “SAME” or “DIFFERENT”.
Compares previous ID and current ID.
Same date? Calculation that returns either “SAME” or “DIFFERENT”.
Compares previous date and current date.
New tour? Calculation that returns either “SAME” or “DIFFERENT”.
Only return “SAME” if both the date and the employee ID
have not changed from the previous record.
Tour count Calculation that increments by 1 if the tours is the same.
Resets to 1 if New Tour? is “DIFFERENT”.
Between 1 and 6? “TRUE” if the tour count is between 1 and 6. “FALSE”
otherwise.
Between 7 and 12? “TRUE” if the tour count is between 7 and 12. “FALSE”
otherwise. Returns a calculation failure if greater than 12.
Base record 2 “TRUE” is the tour count is equal to 7.
WHERE
WHERE
PAYRULENAME != 'Full Time'
3. SELECT
FIRSTNM, LASTNM, BADGENUM, PAYRULENAME
FROM
VP_EMPLOYEEV42
WHERE
PAYRULENAME <> 'Full Time'
4. SELECT
FIRSTNM, LASTNM, BADGENUM, PAYRULENAME
FROM
VP_EMPLOYEEV42
WHERE
PAYRULENAME LIKE 'Pro%'
5. SELECT
FIRSTNM, LASTNM, BADGENUM, PAYRULENAME
FROM
VP_EMPLOYEEV42
WHERE
PAYRULENAME NOT LIKE 'Full%'
AND PAYRULENAME NOT LIKE 'Pro%'
6. SELECT
FIRSTNM, LASTNM, BADGENUM, BASEWAGEHOURLYAMT
FROM
VP_EMPLOYEEV42
WHERE
BASEWAGEHOURLYAMT > 0
ORDER BY
VP_EMPLOYEEV42
WHERE
HOMELABORLEVELNM2 IN ('201', '202', '203')
ORDER BY
HOMELABORLEVELNM2, LASTNM ASC
Useful Functions
HAVING