Skip to content
hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets

Docs

  • PeopleTools Process Scheduler Tables

    2021-03-22

    PeopleTools Process Type Details

    RecordDescription
    PS_PRCSDEFNContains process type and process names
    PSPRCSLOCKContains a single record, this gets updated when a process is submitted

    PeopleTools Process Status

    RecordDescription
    PSPRCSQUEHolds the process request details and should be in sync with PSPRCSRQST.
    PSPRCSRQSTThis table holds the process submitted details
    PS_CDM_LISTContains the process instance details. Should be in sync with PS_CDM_AUTH
    PS_CDM_AUTHContains the process instance details

    PeopleTools Report Node Details

    RecordDescription
    PS_CDM_DIST_NODEThis table holds the report node information which contains the report repository details
    PS_CDM_DISTSTATUSContains the definition of report status

    PeopleTools Batch Server Details

    RecordDescription
    PS_SERVERDEFNContains the server definitions
    PSSERVERSTATGives information about the batch server status

  • PeopleTools Security Tables

    2021-03-22

    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

    2021-03-22

    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

    2021-03-22

    PeopleTools Version Details

    RecordDescription
    PSRELEASEThis table holds the application release details
    PSSTATUSThis table gives the peopletools information

  • Start Data Mover Bootstrap Mode

    2021-03-22

    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

    2021-03-22

    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

    2021-01-10

    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)
    	}
    }
    

    Golang Play

    Output:

    0x1
    0x2
    0x3
    0x4
    0x5
    0x6
    0x7
    0x8
    0x9
    0xa
    0xb
    0xc
    0xd
    0xe
    0xf
    0x10
    0x11
    0x12
    0x13
    

    Convert 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

    2021-01-10

    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

    2020-06-09

    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

    2020-06-09

    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.

  • ««
  • «
  • 1
  • 2
  • 3
  • »
  • »»
Recent posts
  • Understanding the ss Command: A Modern Alternative to netstat
  • Understanding HTTP from Scratch with Python Sockets
  • When Environment Variables Mysteriously Reset...
  • How to Generate a 32-byte Key for AES Encryption
  • Streamlining Deployment: Installing Docker, Gitea, Gitea Act Runner, and Nginx on Ubuntu
© 2025 hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets