If None(NS_ONB_PERS_STG.ADDRESS1, NS_ONB_PERS_STG.CITY, NS_ONB_PERS_STG.STATE, NS_ONB_PERS_STG.POSTAL) Then
&address = "empty"
Else
If None(NS_ONB_PERS_STG.ADDRESS1) Then
Error MsgGet(0, 0, "Please fill in Address line 1 ...");
End-If;
If None(NS_ONB_PERS_STG.CITY) Then
Error MsgGet(0, 0, "Please fill in the City ...");
End-If;
If None(NS_ONB_PERS_STG.STATE) Then
Error MsgGet(0, 0, "Please fill in the State ...");
End-If;
If None(NS_ONB_PERS_STG.POSTAL) Then
Error MsgGet(0, 0, "Please fill in the Postal Code ...");
End-If;
End-If;
Sunday, January 13, 2008
Thursday, January 3, 2008
What is SFTP, and how do I use it?
SFTP, or secure FTP, is a program that uses SSH to transfer files. Unlikestandard FTP, it encrypts both commands and data, preventing passwords andsensitive information from being transmitted in the clear over the network.It is functionally similar to FTP, but because it uses a differentprotocol, you can't use a standard FTP client to talk to an SFTP server,nor can you connect to an FTP server with a client that supports only SFTP.There are two ways you can use SFTP: graphical SFTP clients and commandline SFTP.
Some standard commands for command line SFTP include:
cd Change the directory on the remote computer
chmod Change the permissions of files on the remote computer
chown Change the owner of files on the remote computer
dir (or ls) List the files in the current directory on the remote computer
exit (or quit) Close the connection to the remote computer and exit SFTP
get Copy a file from the remote computer to the local computer
help (or ?) Get help on the use of SFTP commands
lcd Change the directory on the local computer
lls See a list of the files in the current directory on the local computer
lmkdir Create a directory on the local computer
ln (or symlink) Create a symbolic link for a file on the remote computer
lpwd Show the current directory (present working directory) on the localcomputer
lumask Change the local umask value
mkdir Create a directory on the remote computer
put Copy a file from the local computer to the remote computer
pwd Show the current directory (present working directory) on the remotecomputer
rename Rename a file on the remote host
rm Delete files from the remote computer
rmdir Remove a directory on the remote host (the directory usually has tobe empty)
Some standard commands for command line SFTP include:
cd Change the directory on the remote computer
chmod Change the permissions of files on the remote computer
chown Change the owner of files on the remote computer
dir (or ls) List the files in the current directory on the remote computer
exit (or quit) Close the connection to the remote computer and exit SFTP
get Copy a file from the remote computer to the local computer
help (or ?) Get help on the use of SFTP commands
lcd Change the directory on the local computer
lls See a list of the files in the current directory on the local computer
lmkdir Create a directory on the local computer
ln (or symlink) Create a symbolic link for a file on the remote computer
lpwd Show the current directory (present working directory) on the localcomputer
lumask Change the local umask value
mkdir Create a directory on the remote computer
put Copy a file from the local computer to the remote computer
pwd Show the current directory (present working directory) on the remotecomputer
rename Rename a file on the remote host
rm Delete files from the remote computer
rmdir Remove a directory on the remote host (the directory usually has tobe empty)
PeopleCode to limit Search Veiw
serach record SearchInitGlobal string &NONEMP_Only_Access;
If RTrim(&NONEMP_Only_Access, " ") = "" Then
SQLExec("select 'Y' from psroleuser where roleuser = :1 and rolename ='NONEMP_Only_Access' ", %OperatorId, &NonEmp);
If &NonEmp = "Y" Then
&NONEMP_Only_Access = "Y";
Else
&NONEMP_Only_Access = "N"
End-If;
End-If;
If &NONEMP_Only_Access = "Y" Then
Field.EMPL_TYPE.DisplayOnly = True;
PER_SRCH.EMPL_TYPE = "C";
End-If;
If RTrim(&NONEMP_Only_Access, " ") = "" Then
SQLExec("select 'Y' from psroleuser where roleuser = :1 and rolename ='NONEMP_Only_Access' ", %OperatorId, &NonEmp);
If &NonEmp = "Y" Then
&NONEMP_Only_Access = "Y";
Else
&NONEMP_Only_Access = "N"
End-If;
End-If;
If &NONEMP_Only_Access = "Y" Then
Field.EMPL_TYPE.DisplayOnly = True;
PER_SRCH.EMPL_TYPE = "C";
End-If;
Calculating age in Oracle
It is more accurate by using MONTH_BETWEEN than 365 day due to leap years:
floor(MONTHS_BETWEEN(to_date($RptYear, 'dd-mon-yyyy'),BIRTHDATE)/12)
floor(MONTHS_BETWEEN(to_date($RptYear, 'dd-mon-yyyy'),BIRTHDATE)/12)
Scheduling a Process in PeopleCode
Here is a great example of how to schedule a process and email the results from within PeopleCode.You can do this within an App Engine Program or even by placing a pushbutton with FieldChange peoplecode.
Local ProcessRequest &RQST;
Local string &Subject;
Local string &Text;
&Subject = "Subject of Email";
&Text = "This text will be displayed as the text of this email ";
&RQST = CreateProcessRequest();
&RQST.RunControlID = "MYRUNCONTROL_ID";
&RQST.ProcessName = "PROCESSNAME";
&RQST.RunLocation = "PSUNIX";
&RQST.ProcessType = "SQR";
&RQST.OutDestType = "Email";
&RQST.OutDestFormat = "PDF";
&RQST.OutDest = "User : PS,Role : PeopleSoft User";
&RQST.EmailSubject = &Subject;
&RQST.EmailText = &Text;
&RQST.EmailAttachLog = False;
&RQST.Schedule();
Local ProcessRequest &RQST;
Local string &Subject;
Local string &Text;
&Subject = "Subject of Email";
&Text = "This text will be displayed as the text of this email ";
&RQST = CreateProcessRequest();
&RQST.RunControlID = "MYRUNCONTROL_ID";
&RQST.ProcessName = "PROCESSNAME";
&RQST.RunLocation = "PSUNIX";
&RQST.ProcessType = "SQR";
&RQST.OutDestType = "Email";
&RQST.OutDestFormat = "PDF";
&RQST.OutDest = "User : PS,Role : PeopleSoft User";
&RQST.EmailSubject = &Subject;
&RQST.EmailText = &Text;
&RQST.EmailAttachLog = False;
&RQST.Schedule();
Calling an Application Engine from PeopleCode
&rec = CreateRecord(RECORD.MY_INIT_VALUES);
&rec.FIELD1.Value = "123abc"; /* here you are setting the initialvalues needed by your application engine */
CallAppEngine("YouAppEngProg", &rec);
&rec.FIELD1.Value = "123abc"; /* here you are setting the initialvalues needed by your application engine */
CallAppEngine("YouAppEngProg", &rec);
Wednesday, January 2, 2008
PeopleSoft blog & user group
http://blog.greysparling.com/2006/05/application-engine-development-tips.html
http://www.compshack.com/peoplesoft/application-engine/calling-application-engine-peoplecode
http://www.peoplesoftfans.com/psfans/forum/tools/messages/3044.html
http://en.allexperts.com/q/Peoplesoft-2100/Application-Engine-5.htm
http://www.compshack.com/peoplesoft/application-engine/calling-application-engine-peoplecode
http://www.peoplesoftfans.com/psfans/forum/tools/messages/3044.html
http://en.allexperts.com/q/Peoplesoft-2100/Application-Engine-5.htm
Subscribe to:
Posts (Atom)