Docs
PeopleTools Process Scheduler Tables
PeopleTools Process Type Details
Record Description PS_PRCSDEFN Contains process type and process names PSPRCSLOCK Contains a single record, this gets updated when a process is submitted PeopleTools Process Status
Record Description PSPRCSQUE Holds the process request details and should be in sync with PSPRCSRQST. PSPRCSRQST This table holds the process submitted details PS_CDM_LIST Contains the process instance details. Should be in sync with PS_CDM_AUTH PS_CDM_AUTH Contains the process instance details PeopleTools Report Node Details
Record Description PS_CDM_DIST_NODE This table holds the report node information which contains the report repository details PS_CDM_DISTSTATUS Contains the definition of report status PeopleTools Batch Server Details
Record Description PS_SERVERDEFN Contains the server definitions PSSERVERSTAT Gives information about the batch server status PeopleTools Security Tables
Security is a very important part of any PeopleSoft application. It determines what pages users can see all the way down to which rows. It may seem overwhelming at first but don’t worry; it’s pretty straightforward once you learn all the pieces and how they’re connected.
Below you will find a list of the Main PeopleTools Security Records along with a brief summary of their purpose. Knowing these tables can prove useful to quickly troubleshoot, determine which users have what security or even to audit user security regularly.
PeopleTools Update User Password DataMover
Useful for when the main user id gets locked out. First log into Datamover in bootstrap mode. Then using the script below update the users password.
Note: the script will vary depending on the peopletools version. I forget what the version is exactly, 8.54 I believe.
For earlier versions of PeopleTools:
update PSOPRDEFN set OPERPSWD = 'password', ENCRYPTED = 0 where OPRID = 'OPRID'; -- to encrypt the password encrypt_password OPRID;For later versions of PeopleTools
update PSOPRDEFN set OPERPSWD = ' ', PTOPERPSWDV2 = 'password', ENCRYPTED = 0 where OPRID = 'OPRID'; -- to encrypt the password encrypt_password OPRID;PeopleTools Version Details Tables
PeopleTools Version Details
Record Description PSRELEASE This table holds the application release details PSSTATUS This table gives the peopletools information Start Data Mover Bootstrap Mode
If the PS password has been lost or otherwise hosed, use bootstrap mode to make things right again.
In order to start Datamover in bootstrap mode, use the system access ID and access password. For example by default it’s SYSADM.
Learn how to update a user password including the PS password if needed.
User Security Join Table (SJT) Jobs
All of the SJT (Security Join Tables) jobs that that joins security information from other tables in the database into a temporary table on the application server for use in business rules.
SJT_OPR_CLS: Contains the User IDs with their data permission lists.
SJT_CLASS_ALL: Contains the data permission information for all the data permission lists that are given data access on the ‘Security by Dept Tree’ page or ‘Security by Permission List’ page.
Golang Convert from Int to Hex
Converting from an Integer to hex is easy in Golang. Since a hex is really just an Integer literal, you can ask the fmt package for a string representation of that integer, using fmt.Sprintf(), and the %x or %X format.
package main import ( "fmt" ) func main() { for i := 1; i < 20; i++ { h := fmt.Sprintf("0x%x", i) fmt.Println(h) } }Output:
0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13Convert back to int
package main import ( "fmt" "strconv" ) var hex = []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "10", "11", "12", "13"} func main() { for _, h := range hex { i, _ := strconv.ParseInt(h, 16, 64) fmt.Println(i) } }Output:
Golang Split Host Port to Separate Variables
Getting just the host or port from the “host:port” form is easy using the SplitHostPort function from the net package.
Below are some example uses of the function. As seen below, IPv6 addresses in hostport must be enclosed in square brackets.
package main import ( "fmt" "net" ) func main() { // IPv4 host, port, err := net.SplitHostPort("172.217.7.14:443") if err != nil { fmt.Println(err) } fmt.Println(host, port) // IPv6 host, port, err = net.SplitHostPort("[2607:f8b0:4006:800::200e]:443") if err != nil { fmt.Println(err) } fmt.Println(host, port) // Domain host, port, err = net.SplitHostPort("example.com:80") if err != nil { fmt.Println(err) } fmt.Println(host, port) }Output:
Golang Convert File Size to a human friendly format
Get file size in human-readable units like kilobytes (KB), Megabytes (MB) or GigaBytes (GB)
1 KilloByte == 1024 Bytes
1 Megabyte == 1024*1024 Bytes
1 GigaByte == 102410241024 Bytes
package main import ( "fmt" "log" "math" "os" "strconv" ) var ( suffixes [5]string ) func Round(val float64, roundOn float64, places int ) (newVal float64) { var round float64 pow := math.Pow(10, float64(places)) digit := pow * val _, div := math.Modf(digit) if div >= roundOn { round = math.Ceil(digit) } else { round = math.Floor(digit) } newVal = round / pow return } func HumanFileSize(size float64) string { fmt.Println(size) suffixes[0] = "B" suffixes[1] = "KB" suffixes[2] = "MB" suffixes[3] = "GB" suffixes[4] = "TB" base := math.Log(size)/math.Log(1024) getSize := Round(math.Pow(1024, base - math.Floor(base)), .5, 2) fmt.Println(int(math.Floor(base))) getSuffix := suffixes[int(math.Floor(base))] return strconv.FormatFloat(getSize, 'f', -1, 64)+" "+string(getSuffix) } func main() { files, err := os.ReadDir(".") if err != nil { log.Fatal(err) } for _, file := range files { fs := float64( file.Size() ) fmt.Println(file.Name(), HumanFileSize(fs), file.ModTime()) } }Golang Listing Directory Contents and Sorting by File Modified Time
In this example we will be listing the contents of a directory in go and sorting by date.
To get the list of files we will use the os.ReadDir function from the os package. This function returns a slice sorted by file name which contains elements of os.FileInfo type which will enable us to get the last modified time.
To sort the files we will use the modification time with the sort package along with the After and Before functions from the time package.