












SELECT * from PS_PTLT_COMP_NAV;
/* Provide navigation location for component */ SELECT a.portal_name, e.portal_label AS parent4_folder, d.portal_label AS parent3_folder, c.portal_label AS parent2_folder, b.portal_label AS parent_folder, a.portal_label AS component FROM psprsmdefn a LEFT JOIN psprsmdefn b ON b.portal_name = a.portal_name AND b.portal_objname = a.portal_prntobjname LEFT JOIN psprsmdefn c ON c.portal_name = b.portal_name AND c.portal_objname = b.portal_prntobjname LEFT JOIN psprsmdefn d ON d.portal_name = c.portal_name AND d.portal_objname = c.portal_prntobjname LEFT JOIN psprsmdefn e ON e.portal_name = d.portal_name AND e.portal_objname = d.portal_prntobjname WHERE a.portal_reftype = 'C' AND a.portal_uri_seg2 = 'ADM_APPL_MAINTNCE' -- Parameter to set: (In this case I used the component - ADM_APPL_MAINTNCE)
SELECT DISTINCT rtrim(reverse (sys_connect_by_path(reverse (portal_label), ' > ')), ' > ') path FROM psprsmdefn WHERE portal_name = 'EMPLOYEE' AND portal_prntobjname = 'PORTAL_ROOT_OBJECT' START WITH portal_uri_seg2 = :1 CONNECT BY PRIOR portal_prntobjname = portal_objname
There are more than 20 times that my staged result got cleared from front end by some other people (I’m not telling who they are).
One good part is, if the data are not flushed in database, we can still see the result.
SELECT *
FROM PS_GP_PKG_ELEMENTS ELE, PS_GP_PINTYPE_VW PINTYPE, PSXLATITEM XLAT
WHERE ELE.GP_PKG_ID = '<PACKAGE_NAME>'
AND XLAT.fieldname = 'GP_PKG_FAIL_REASON'
AND ELE.PIN_TYPE = PINTYPE.PIN_TYPE
AND ELE.GP_PKG_FAIL_REASON = XLAT.FIELDVALUE;--
select count(*)
from PS_GP_PKG_ELEMENTS ELE
where ELE.GP_PKG_ID = '<PACKAGE_NAME>';
[source: hmmm… my apologies to the original writer, I really can’t recall where I took this note from… apologies again.]
PeopleSoft trace supports only objects only within PeopleTools, so we cannot trace COBOL SQLs. Is this true?
NO.
It is possible to generate COBOL SQL(cobsql.) Trace along with bind values. And it is possible to generate cobsql.trc files in both TWO TIER and THREE tier modes.
To generate cobsql.trc file for COBOL programs in THREE TIER(Application Server) do the following:
1) Shutdown the application server
2) Open the psappsrv.cfg
3) Set the RCCBL Redirect to 1
4) Uncomment the line Log Directory (in the domain settings section) <== This is a necessary step (If it is on unix, make sure the "\" is changed to "/")
5) Set the TraceSQL to 255.
6) Save psappsrv.cfg
7) Shut down and reboot the application server (it will take some time for the app. server to boot, as you have turned on tracing)
8) Click on any remotecall cobol and then check both the temp and <pshome>/appserv/logs folders for the following:
a) you will have <COBOL PROGRAM>_<OPRID>.out /.err files appearing in the <pshome>/appserv/logs folder.
b) you will also get sql trace of the panels involving sql
c) you will also get cobsql_<datetime>.trc (THIS IS THE TRACE FILE YOU WANT TO SEE)
[Process Scheduler]
Log Directory=%PS_SERVDIR%/logs
To generate cobsql.trc file for COBOL programs in TWO TIER do the following:
1) Open configuration manager -- Trace Tab.
2) Check all or selected boxes on the left-hand side (except for the Sybase Information) on the Trace Tab
3) Check the Re-direct output box on the Process Scheduler tab of Configuration Manager also.
The cobsql trace file will reside under %TEMP%\PS\DBName in the format cobsql_program-name_datetime.trc.
HOWTO: trace TL_TIMEADMIN
By following the Application Engine program convention, either we can override or append a Parameter List, say “-TRACE 135 -TOOLSTRACESQL 31”:
Main Menu > PeopleTools > Process Scheduler > Processes
Process Name: TL_TIMEADMIN
When debugging PeopleSoft T&L rules, the SQL below can be used to trace a specified TRC (take “SH125” as my example):
select * from PS_TL_RULE_PGM_DTL A, PS_TL_RULE_STEPS B, PS_TL_SQL_EXPRESSN C where A.RULE_PGM_ID='AGEP' and A.TL_RULE_ID=B.TL_RULE_ID and B.SQL_ID = C.SQL_ID
and C.EXPRESSIONTEXT like '%SH125%' /*<<<<< the TRC focused*/
order by A.PRIORITY, B.TL_RULE_STEP;
Time and Labor rules can be copied across from one environment to the other by running DMS scripts. Oracle support site has a complete DMS script listed for the same purpose. For quick reference I just list my script here. Do remember to put on 'WHERE' clauses for each statement, if necessary.
EXPORT TL_RULE_DEFN [WHERE…]
EXPORT TL_RULE_STEPS
EXPORT TL_RULE_CONDS
EXPORT TL_TMPLT_RULE
EXPORT TL_TMPLT_RULE2
EXPORT TL_SQL_BINDS
EXPORT TL_SQL_INSERT
EXPORT TL_SQL_JOIN
EXPORT TL_SQL_JOINFLDS
EXPORT TL_SQL_OBJECT
EXPORT TL_SQL_SEL_FLDS
EXPORT TL_SQL_TABLES
EXPORT TL_SQL_UPDATE
EXPORT TL_SQL_UPDBINDS
EXPORT TL_SQL_WHERE
EXPORT TL_SQL_WHRBINDS
EXPORT TL_SQL_EXPRESSN
EXPORT TL_RULE_PGM
EXPORT TL_RULE_PGM_DTL
This can be done by non-rule package as well.
Note: In version 9.1 PeopleSoft has come up with a utility to export and import rules between environments. Using that will eliminate to either memorise or execute the DMS scripts manually and riskily.
In PT8.2x, simply add (on the bottom of this blog I’ll discuss about the file path separator) :
&FileStr = GetEnv("PSPRCSLOGDIR")|"\yourFile.txt";
&POSI_FILE = GetFile(&FileStr, "W", %FilePath_Absolute);
Use %FilePath_Absolute (instead of %FilePath_Relative) .
As per Oracle:
With Application Engine only .log, .trc, .AET, .out can be used. No other extensions work other than these 4 extensions, none of the files will make it to the Report Repository (.err is another story, though). Please note that there must not be multiple “.” in file names.
As some developer mentioned it is possible with PT 8.4x which allows user to picked up other extensions by process types, for example, .txt - Couple things to look into:
At runtime by running this query it will get the current output directory where “.out” is going, and create the file here.
Struggling with finding the output directory? May the SQL below help:
select PRCSOUTPUTDIR from PSPRCSPARMS where PRCSINSTANCE = {SOMETABLE_AET}.PROCESS_INSTANCE
Below is the code example:
SQLExec("SELECT PRCSOUTPUTDIR FROM PSPRCSPARMS WHERE PRCSINSTANCE = :1", {SOMETABLE_AET}.PROCESS_INSTANCE, &path);
/* Assume that the NT server’s name is "PSNT". */
SQLExec("SELECT A.SERVERNAMERUN FROM PSPRCSRQST A WHERE A.PRCSINSTANCE = :1", {SOMETABLE_AET}.PROCESS_INSTANCE, &serverrun);
If &serverrun = "PSNT" Then
&DirSep = "\";
Else
&DirSep = "/";
End-If;
&outputFileName = RTrim(&path | &DirSep | {OUTPUTFILENAME} | ".txt");
&fileHandler = GetFile(&outputFileName, "W", %FilePath_Absolute);
Note that when open file in 'A' - append mode it may not generate any output file. But 'W' - write mode works in my case.
Another way to get the file path separator character is:
/* Get Env Specific directory separator */
&FilePath = GetEnv("PS_SERVDIR");
&DirSep = "/";
If Substring(&FilePath, 1, 1) <> "/" Then
&DirSep = "\";
End-If;If Right(&FilePath, 1) <> "/" Or
Right(&FilePath, 1) <> "\" Then
&FilePath = &FilePath | &DirSep;
End-If;
&FilePath = &FilePath | "files" | &DirSep;
[source: http://peoplesofthrms.blogspot.com.au/search/label/File%20Layouts ]
Ran into a peculiar problem while writing to a file using File Layouts today. Fields that had a space in the database was being converted to null while writing to the file. Did all the obvious checks like ensuring the Trim Spaces and Strip White Spaces properties of the FileLayout were unchecked.
Then ran into the File Class property - UseSpaceForNull. This property was introduced in Peopletools 8.48 and does the neat job of ensuring that spaces are printed in the output file instead of nulls when attempting to print fields that indeed had a space in database. It is a read-write property and has to be used immediately after instantiating the file layout as shown below:
<* Example starts
If &FILE1.IsOpen Then
If &FILE1.SetFileLayout(FileLayout.FL_NAME) Then
/* has to be used immediately after instantiating the file layout */
&FILE1.UseSpaceForNull = True;
end-if;
end-if;
<* Example ends
- Install Oracle database
- Install PeopleTools CD
- Install Application CD (i.e. HRMS & Campus Solutions. Make sure that install HRMS & Campus Solutions into the same folder as PeopleTools.)
- Create Oracle DB for PeopleSoft
- Install BEA Tuxedo CD
- Install BEA Weblogic CD
- Configure App Server
- Install and Configure PIA
- Login to PIA
Local File &CHARTINPUT_F; Local Rowset &INPUT_ROWSET, &TEMP_RS, &WORK_DATA; Local Record &WRK_DATA; &filename = "c:\temp\test.txt"; If FileExists(&filename, %FilePath_Absolute) Then &CHARTINPUT_F = GetFile(&filename, "R", "A", %FilePath_Absolute); Else Exit; End-If; &CHARTINPUT_F.SetFileLayout(FileLayout.CHART_INFO); /* Create rowset to be read into NOTE that you have to start at LOWEST level of rowset */ &TEMP_RS = CreateRowset(RECORD.CHART_ITEM); &WORK_DATA = CreateRowset(RECORD.CHART_DATA, &TEMP_RS); &INPUT_ROWSET = CreateRowset(RECORD.CHART, &WORK_DATA); While &INPUT_ROWSET <> Null &INPUT_ROWSET = &CHARTINPUT_F.ReadRowset(); &INPUT_ROWSET.CopyTo(&WORK_DATA); /* do processing -- Though file may contain more than one level zero Component processor only allows one level zero at a time */ End-While;
"Transaction (Process ID 93) was deadlocked on lock resources with another process and has been chosen as the deadlock victim".Simply re-issuing the report will cause another problem - in VAT1001 SQR Report (even Process Monitor showed "Success" and "Posted"), it just shows:
PROCESS_INSTANCE = 123456789----------------------------------------------------------------------------------------------------------
No rows found to round in PS_VAT_TXN_TMP_TBL
begin-procedure Main-Processing
#debugp do Debug-Msg('Main-Processing')
do Mark-Txn-Lines
do Insert-vat-txn-tmp-tbl
#ifdef MICROSOFT
do Update-Statistics
#else
#ifdef INFORMIX
do Update-Statistics
#else
#ifdef ORACLE
do Update-Statistics
#end-if
#end-if
#end-if
do delete-frm-vat-txn-tbl
do Fill-Line-Info
do Get-Report-Defn-Header
do Get-Home-Country
do Create-VAT-Rpt-Inst1
do Process-Report-Lines
do Insert-vat-rpt-err1
do Check-for-Unselected
do Update-In-Process-Flag
do insert-vat-txn-tbl
do delete-vat-txn-tmp-tbl
do Process-Scheduler-Closing
#debugp display 'Leaving Main-Processing'
end-procedure ! Main-Processing
SELECT * FROM PS_VAT_TXN_TBL, PS_VAT_RPT_INST2 B, PS_VAT_RPT_INST1 C
WHERE PS_VAT_TXN_TBL.PROCESS_INSTANCE = [## the failed PI##]
AND B.PROCESS_INSTANCE = C.PROCESS_INSTANCE
AND B.VAT_RPT_ID = C.VAT_RPT_ID
AND PS_VAT_TXN_TBL.VAT_ENTITY = B.VAT_ENTITY
AND PS_VAT_TXN_TBL.COUNTRY_VAT_RPTG = B.COUNTRY_VAT_RPTG
AND PS_VAT_TXN_TBL.VAT_DCMNT_ID = B.VAT_DCMNT_ID
AND PS_VAT_TXN_TBL.LINE_NBR = B.LINE_NBR
--AND C2.VAT_RPT_TYPE = $rqst_vat_rpt_type;
SELECT * FROM PS_VAT_TXN_TBL, PS_VAT_RPT_ERR2 B2, PS_VAT_RPT_INST1 C2
WHERE B2.PROCESS_INSTANCE = C2.PROCESS_INSTANCE
AND PS_VAT_TXN_TBL.VAT_ENTITY = B2.VAT_ENTITY
AND PS_VAT_TXN_TBL.COUNTRY_VAT_RPTG = B2.COUNTRY_VAT_RPTG
AND PS_VAT_TXN_TBL.VAT_DCMNT_ID = B2.VAT_DCMNT_ID
AND PS_VAT_TXN_TBL.LINE_NBR = B2.LINE_NBR
--AND C2.VAT_RPT_TYPE = $rqst_vat_rpt_type
AND B2.VAT_RPT_ASSOC_FLG IN ('T', 'A')
select ROLENAME from PSROLECLASS where CLASSID='[the_permission_list]';Then we can grant user the role from the result.
insert into PSROLEUSER values ('[user_id]', '[role_name]', '[dynamic_sw]')======== To overview all permission lists assigned to a USER. ========
select RU.ROLEUSER, RU.ROLENAME, RC.CLASSID from PSROLEUSER RU, PSROLECLASS RC where RU.ROLENAME=RC.ROLENAME and RU.ROLEUSER='PS'
or, if want to see more:select * from PSAPMSGPUBCON where STATUSSTRING='ERROR'
select * from PSAPMSGPUBHDR HDR, PSAPMSGPUBCON CON where HDR.IBTRANSACTIONID=CON.IBPUBTRANSACTID and CON.STATUSSTRING not in ('DONE', 'CNCLD')
insert into PSAPMSGSUBPRCID values(0)
PeopleSoft Integration Gateway
PeopleSoft Listening Connector
Status: ACTIVE
PSAPPSRV.6475 (32) [10/17/06 22:09:45 VP1@JavaClient IntegrationSvc](3) PeopleSoft Token authentication failed: issuing node PSFT_HR is not a trusted node : PS@JavaClient