T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
BASIC system function

Namespaces

 SYSBase
 

Functions

 aexec cmd
 This function executes a external command (asynchron). More...
 
 check_base64string base64string
 Checks, whether the input string is a valid Base64 string. Newlines are ignored. More...
 
 checked_base64tobinfile base64string filename ?writemode?
 write the binary Base64-decoded version of the input string to a file. More...
 
 deh16 string
 This function converts a HEX16 string to a clear string. More...
 
 enh16 string
 This function converts a string to HEX16. More...
 
 flip2Unix fname
 This function converts the line ends of a file to unix notation. More...
 
 flip2Windows fname
 This function converts the line ends of a file to windows notation. More...
 
 getSyslogDir args
 This function returns the name of the T4x syslog directroy. More...
 
 getTmpDir args
 This function returns the name of the T4x tmp directroy. More...
 
 idlewait msec
 This function is an alternative to TCL "after". It does not block the idle loop. More...
 
 instanceName args
 This function returns the instance name of the T4x installation. More...
 
 loadLibrary libraryName ?required? ?sourceName? ?libraryDirectory?
 load a rfdt More...
 
 rcwd args
 get the T4x root directory More...
 
 secOfTheDay args
 This function calculates the time of day in seconds. More...
 
 sexec cmd
 This function executes a external command (synchron). More...
 
 unixid args
 This function generates a ~unique~ ID 64Bit string. More...
 

Detailed Description

Function Documentation

◆ aexec()

SYSBase::aexec   cmd  

This function executes a external command (asynchron).

don't wait for command result.

Parameters
cmd: the external command
Returns
PID of the external process or error message
1 puts [::SYSBase::aexec "ls -la"]
2 
3 output:
4 23677

References tpwrite().

◆ check_base64string()

SYSBase::check_base64string   base64string  

Checks, whether the input string is a valid Base64 string. Newlines are ignored.

Parameters
base64stringbase64 encoded string
Returns
0 if base64string is a valid base64 string, 1 else
1 ::SYSBase::check_b64string "V0lMTEk=" returns 0
2 ::SYSBase::check_b64string "V0lMTEk" returns 1

Referenced by SYSBase::checked_base64tobinfile().

◆ checked_base64tobinfile()

SYSBase::checked_base64tobinfile   base64string filename ?writemode?  

write the binary Base64-decoded version of the input string to a file.

Parameters
base64stringbase64 encoded string
filenameoutput file name
writemode
See also
tpco_b64tobinfile
Returns
"" on success, ERROR on error
1 ::SYSBase::checked_base64tobinfile "V0lMTEk=" willi.tmp

References SYSBase::check_base64string(), and tpco_b64tobinfile().

◆ deh16()

SYSBase::deh16   string  

This function converts a HEX16 string to a clear string.

don't use this funktion (see tpco_formatHEX16)

Parameters
string: the input HEX16 string
Returns
the clear string

◆ enh16()

SYSBase::enh16   string  

This function converts a string to HEX16.

don't use this funktion (see tpco_scanHEX16)

Parameters
string: the input string
Returns
the HEX16 string

◆ flip2Unix()

SYSBase::flip2Unix   fname  

This function converts the line ends of a file to unix notation.

Parameters
fname: the file name
Returns
none

◆ flip2Windows()

SYSBase::flip2Windows   fname  

This function converts the line ends of a file to windows notation.

Parameters
fname: the file name
Returns
none

◆ getSyslogDir()

SYSBase::getSyslogDir   args  

This function returns the name of the T4x syslog directroy.

Returns
the syslog directory
2 
3 output:
4 sys/nihil/BGS_20120717-043049/

References SYSBase::instanceName(), and tpco_getHostName().

◆ getTmpDir()

SYSBase::getTmpDir   args  

This function returns the name of the T4x tmp directroy.

Returns
the syslog directory
2 
3 output:
4 /home/joerg/work/TR1491/tp_core_Linux_x86_64_debug/tmp

References rcwd(), and tpco_shmget().

Referenced by T4X::TRANSLOG::getTransLogFile().

◆ idlewait()

SYSBase::idlewait   msec  

This function is an alternative to TCL "after". It does not block the idle loop.

Parameters
msec: wait n-milliseconds
Returns
none

◆ instanceName()

SYSBase::instanceName   args  

This function returns the instance name of the T4x installation.

Returns
the instance name
2 
3 output:
4 BGS_20120717-043049

References rcwd(), tpco_shmexists(), tpco_shmexset(), and tpco_shmget().

Referenced by SYSBase::getSyslogDir().

◆ loadLibrary()

SYSBase::loadLibrary   libraryName ?required? ?sourceName? ?libraryDirectory?  

load a rfdt

Parameters
libraryname without rfdt, without path, (the path and extension is truncated)
optionalrequired (default yes: true), else optional (false)
optionalsource name without sd, without path (the path and extension is truncated)
optionallibraryDirectory
Returns
0 on success, 1 on error
1 ::SYSBase::loadLibrary licmgrclient

References rcwd(), source(), tpco_loadRFDT(), and tpwrite().

◆ rcwd()

◆ secOfTheDay()

SYSBase::secOfTheDay   args  

This function calculates the time of day in seconds.

Returns
second of the day
2 
3 output:
4 23776

◆ sexec()

SYSBase::sexec   cmd  

This function executes a external command (synchron).

wait for command result.

Parameters
cmd: the external command
Returns
the command result
1 puts [::SYSBase::sexec "ls -la"]
2 
3 output:
4 total 1836
5 drwxrwxr-x 10 joerg joerg 4096 Jul 18 15:26 .
6 drwxrwxr-x 6 joerg joerg 4096 Jul 17 04:30 ..
7 -rw-rw-r-- 1 joerg joerg 156763 Jul 18 11:02 9ada3e.copy
8 -rw-rw-r-- 1 joerg joerg 156763 Jul 17 06:00 9ada3e.sig
9 ...

References tpwrite().

◆ unixid()

SYSBase::unixid   args  

This function generates a ~unique~ ID 64Bit string.

Returns
none
2 
3 output:
4 134267369934005

Referenced by TPSAP::REFSETOFOPERATIONS::callBAPI_REFSETOFOPERATIONS_CREATE(), and CONFIGURATION::MANAGER::Scheduler::setScheduledProcessList().