Monthly Archives: August 2014

Escape Character in PeopleCode

I was working on a project and came across a scenario where I needed to escape a character in PeopleCode. Specifically a double quote. In order to do that you have to just repeat the double quote:

(notice the double quotes prior to and at the end of IdentityFile)

Local integer &execute;
Local string &cmd;

/*SET PS_HOME DIRECTORY*/
&PS_HOME = LTrim(RTrim(GetEnv("PS_HOME"), "/"), "/");

&cmd = "sftp -o ""IdentityFile=/" | &PS_HOME | "/user/sshkeys/private/sftp-key"" sftp@123.123.123.123:/path/* /" | &PS_HOME | "/attachments/";
&execute = Exec(&cmd, %Exec_Synchronous + %FilePath_Absolute);

Evaluate &execute
When = 0
MessageBox(0, "", 30001, 1, "Files moved Successfully.");
When = 1
MessageBox(0, "", 30001, 1, "Files moved Successfully with an exit code of 1.");
When-Other
MessageBox(0, "", 30001, 1, "Exit code did not return 0. &execute = " | &execute);
End-Evaluate;
CommitWork();

Updating xsd and xsl in jDeveloper

When having to update an xsd (field name changes) in a composite in jDeveloper I found its easier to just go to the source and update the xsd and then go to your Transformation xsl as well and change the source. In order to see the design view updated close your Transformation in jDeveloper and re-open it. You will see the updated field names there. This helps so you don’t have to go and re-do your mapping xsl in the Design view.