Tuesday, January 29, 2008

Authroized Actions (PSAUTHITEM)

AUTHORIZED ACTIONS COLUMN IN THE PSAUTHITEM TABLE

1: Add
2: Update Display
3: Add/Update/Display
4: Update/Display All
5: Add/Update/Display All
6: Update/Display/Update/Display All
7: Add/Update/Display/Update/Display All
8: Correction
9: Add/Correction
10: Update/Display / Correction
11: Add/Update/Display/Correction
12: Update/Display All/Correction
13: Add/Update/Display All/Correction
14: Update/Display/Update/Display All/Correction
15: Add/Update/Display/Update/Display All/Correction
128: Data Entry

Each possible authorized action has a corresponding decimal value. For all the authorized actions for a given menu item for a given operator, these numbers are added together and stored in the authorizedactions column.

For example, if the value for authorizedactions column is 143, the operator is authorized for all the actions. (1 2 4 8 128).

As another example, if the value is 7, the operator is authorized for the actions Add, Update/Display, Update/Display All (1 2 4).

---- Following part is not my writing -----------
An example of a number that seems to be too big to be translated is the following:
The number we will use in our example is 3604

This translates to 111000010100 in binary.
We take the lower 8 bits, which will be 00010100
then we use that to convert and find out what authorized actions the user has:

0 0 0 1 0 1 0 0
| | | | | | | -- Add
| | | | | | ---- Update / Display
| | | | | ------ U/D All
| | | | -------- Correction
| | | ----------
| | ------------ > Unused
| -------------- /
---------------- Data Entry




Also i have modifed the query a bit for SQL server as bitAnd does not work for SQL.


select classid, menuname, barname, baritemname, pnlitemname, displayonly,
case when bitand(authorizedactions,1) > 0 then 'Y' else 'N' END ADDACTION,
case when bitand(authorizedactions,2) > 0 then 'Y' else 'N' END UPDATEACTION,
case when bitand(authorizedactions,4) > 0 then 'Y' else 'N' END UPDATEALLACTION,
case when bitand(authorizedactions,8) > 0 then 'Y' else 'N' END CORRECTIONACTION,
case when authorizedactions > 15 then 'Y' else 'N' END SPECIAL
from psauthitem
where classid = 'ALLPAGES'

SELECT CLASSID, MENUNAME, BARNAME, BARITEMNAME, PNLITEMNAME,CASE WHEN (DISPLAYONLY & 1) > 0 THEN 'Y' ELSE 'N' END DISPLAYONLY,
CASE WHEN (cast(AUTHORIZEDACTIONS as int) & 1) > 0 THEN 'Y' ELSE 'N' END ADDACTION,
case when (cast(AUTHORIZEDACTIONS as int) & 2) > 0 then 'Y' else 'N' END UPDATEACTION,
case when (cast(AUTHORIZEDACTIONS as int) & 4) > 0 then 'Y' else 'N' END UPDATEALLACTION,
case when (cast(AUTHORIZEDACTIONS as int) & 8) > 0 then 'Y' else 'N' END CORRECTIONACTION,
CASE WHEN cast(AUTHORIZEDACTIONS as int) > 15 THEN 'Y' ELSE 'N' END SPECIAL
FROM PSAUTHITEM NOLOCK
WHERE CLASSID =

Monday, January 28, 2008

Find PeopleSoft Navigation

Create the following procedure and execute by passing the portal_objname to it.
This script is for MSS.

I know it is not very efficient but definately works.

USE [DBName]
GO
/****** Object: StoredProcedure [dbo].[ShowNavigation] Script Date: 01/28/2008 01:01:37 ******/SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[ShowNavigation]( @POBJNAME VARCHAR(30))AS
BEGIN
SET NOCOUNT ON
DECLARE @CNTR INT ,
@PLABEL1 VARCHAR (500),
@PRNTNAME VARCHAR (30),
@PLABEL varchar(90),
@PLABEL2 VARCHAR (50)

SELECT @CNTR = 1
SELECT @PLABEL1 = PORTAL_LABEL FROM dbo.PSPRSMDEFN WHERE
PORTAL_OBJNAME = @POBJNAME;
SELECT @PRNTNAME = PORTAL_PRNTOBJNAME FROM dbo.PSPRSMDEFN WHERE
PORTAL_OBJNAME = @POBJNAME;
SELECT @PLABEL2 = PORTAL_LABEL FROM dbo.PSPRSMDEFN WHERE
PORTAL_OBJNAME = @PRNTNAME;
PRINT (@PLABEL1 + '- '+@PLABEL2)
BEGIN
WHILE @PRNTNAME <> 'PORTAL_ROOT_OBJECT'
BEGIN EXEC ShowNavigation @PRNTNAME
IF @PRNTNAME = 'PORTAL_ROOT_OBJECT'
BREAK;
SELECT @PRNTNAME = PORTAL_PRNTOBJNAME FROM
dbo.PSPRSMDEFN WHERE PORTAL_OBJNAME = @PRNTNAME;
SELECT @PLABEL = PORTAL_LABEL FROM PSPRSMDEFN WHERE
PORTAL_OBJNAME = @PRNTNAME;

END
END
END

Friday, January 25, 2008

Free Left Turns in PUNE ?

No, going by the law ... You cannot take a free left turn if the traffic authorities have provided a Signal specifically for taking a left turn.

Standing at the penultimate signal before Null Stop, Kothrud, Pune, this is what I witnessed couple of days back.

Two Traffic Custodians busy issuing receipts to those taking a left turn inspite of the STOP signal. But who were stopping the law breakers , a youth may be of 20-22 yrs and to his support a person who must have witnessed atleast 55 rainy seasons. Both civilians with whistles blowing and getting people to the side making them pay for the decision.

As I passed them i saw the youth in his eyes ... I felt like he was enjoying the authority the was given , but with the hope that he behaves with atleast traffic responsibility that he learnt that day.
I hope some day People of Pune learn to drive with some responsibility and respect to the three colours on the pole for their and more for their dependant families benefits.

All this was happening on LAW COLLEGE road in Pune.

Peoplesoft Upgrade

UPGRADE
Terms Used in Upgrade
CoP - Copy of Production
CCD - Copy of Current Demo (It is vanilla demo of the version in which the production is.)
NRD - New Release Demo
Before the Upgrade
1. The CoP and CCD should be at the same PeopleSoft Patch Levels.
2. Verify that Upgrade path is given by PeopleSoft
3. Find out and apply if necessary the Required for Upgrade Steps.
Navigation - PeopleSoft Customer Connect -
Implement, Optimize, and Upgrade » Upgrade Guide » Upgrade Documentation and Software » Upgrade Documentation and Scripts » Release
4. Step is extremely important as generally the UPGCONVERT project comes through the above link.
Some issues faced during Upgrade -
1. DBCC CHECKDB went into errors – Running it as part of the CA Upgrade Job
There 14 inconsistencies. This happens if the database restore does not happen smoothly, some block allocation/corruptions occurs.
a. Identified all the tables which went into error – There were 11
b. 8 of them had single errors and 3 of them had 2 errors each listed
c. Total no. of Inconsistencies were 14
d. Ran the below script for each Table and their indexes
e. USE UCP83
GO
DBCC UPDATEUSAGE ('<db name>', '<table 1>', '<table 2>')
2. Compare Fields
In this step in the Upgrade job we find if any PeopleSoft delivered tools field is touch/customized.
You have to merge PPLTOOLS and PPLTLS84CUR projects in to Compare_PPLTools project in the New Release Demo and do a compare
it with CoP. Care needs to be take to do a Project level compare and not a database level compare.
3. If a compare and report is run between two instance with wrong parameter like database is chosen instead of project then the project that was compared needs to be deleted and recreated. Read peoplebooks for understanding what compare and report actually does.
Details of fields in ProjectItem table.
Source Status - 1 - Absent
- 2 - Changed
- 3 - Unchanged
- 4 - *Changed
- 5 - *Unchanged
- 6 - Same
Above applies to TargetStatus
Upgrade Action - 0 - Copy
- 1 - Delete
- 2 - None
- 3 - Copy Prop
The above details can be used to script that change the actions that need to be taken when the project is copied.
For eg. If it is decided that everything that is customised by the client needs to be copied between database then
update PSPROJECTDEFN set UPGRADEACTION = 0 where SOURCESTATUS = 4

In the latest version of PeopleSoft , in the client status we see pool and not the list of users logged in . To see the user list :
modify web.xml and turn joltpooling entry to false.
/webserv//applications/peoplesoft/PORTAL/WEB-INF/web.xml

While altering tables we get error :- in SQL SERVER
String or binary data would be truncated.
The statement has been terminated.
We get the above error when peoplesoft wants to change the column datatype.
First it creates a dummy column , populates data , drops old column , rename dummy column to the original one.
We get the above error while converting text field to varchar(2000).
set ANSI_WARNING OFF will help us complete the scrip successfully.


After upgrade .. many times we get errors while opening pages - error like

first operand null, hmcr servcies .. this is related to campus solutions. To get rid..
open PERMISSION LIST attached to all users, go to web serivices and add services in question give full access.

Run the Refresh Cache process for the HCM Service Framework on Set Up HRMS, System Administration, HCM Registry, Service Registry, HCM Interface Registry page

SQR Flags
      A. (-i) This flag tells SQRW where to look for any SQC subroutines that are included in your SQR using the "#INCLUDE" command. It is very important that the path contain a trailing backslash.
        Example: -iS:\EP_Master\e752f70\sqr\
      B. (-m) This flag tells SQRW where to look for the startup file ALLMAXES.MAX which contains processing limits for various internal parameters.
        Example: -mS:\EP_Master\e752f70\sqr\allmaxes.max

      C. (-ZIF) For SQR versions 4.x, this flag points to the location of your initialization file, PSSQR.INI.
        Example: -ZIFs:\EP_Master\E752f70\sqr\pssqr.ini

      D. (-o) This flag is used to define your SQR log file path and name.
      Example: -oC:\temp\SQR.LOG

      E. (-f) This flag points to the location where your output will be directed to. It is very important that the path contain a trailing backslash.
      Example: -fC:\temp\

      SQRW C:\psoft\PT855\custom\sqr\fixit.sqr DBNAME/USERNAME/PWD -iC:\psoft\PT855\sqr\ -ZIFC:\psoft\PT855\sqr\pssqr.ini -oC:\temp\fixit.LOG -fC:\temp\ ' ' 'param1' 'param2' param3_number