Monday, March 14, 2011

Putty commands


PuTTY Commands
SNS 5/20/2008
 
PuTTY Commands: 
 
ls - to list files in a directory:
cd - change directory
cp - copy a file
mv - move a file 
mv - move a file 
mkdir - make directory
pwd - show your current location
whoami - find out which user you are
date - display date and time
man - most important of all commands (opens manual pages for other commands):
q - quit or exit an application 
An A-Z Index of the Linux BASH command line
alias    Create an alias
apropos  Search Help manual pages (man -k)
awk      Find and Replace text, database sort/validate/index
break    Exit from a loop
builtin  Run a shell builtin
bzip2    Compress or decompress named file(s)
 
cal      Display a calendar
case     Conditionally perform a command
cat      Display the contents of a file
cd       Change Directory
cfdisk   Partition table manipulator for Linux
chgrp    Change group ownership
chmod    Change access permissions
chown    Change file owner and group
chroot   Run a command with a different root directory
cksum    Print CRC checksum and byte counts
clear    Clear terminal screen
cmp      Compare two files
comm     Compare two sorted files line by line
command  Run a command - ignoring shell functions
continue Resume the next iteration of a loop
cp       Copy one or more files to another location
cron     Daemon to execute scheduled commands
crontab  Schedule a command to run at a later time
csplit   Split a file into context-determined pieces
cut      Divide a file into several parts
 
date     Display or change the date & time
dc       Desk Calculator
dd       Data Dump - Convert and copy a file
ddrescue Data recovery tool
declare  Declare variables and give them attributes
df       Display free disk space
diff     Display the differences between two files
diff3    Show differences among three files
dig      DNS lookup
dir      Briefly list directory contents
dircolors Colour setup for `ls'
dirname  Convert a full pathname to just a path
dirs     Display list of remembered directories
du       Estimate file space usage
 
echo     Display message on screen
egrep    Search file(s) for lines that match an extended expression
eject    Eject removable media
enable   Enable and disable builtin shell commands
env      Environment variables
ethtool  Ethernet card settings
eval     Evaluate several commands/arguments
exec     Execute a command
exit     Exit the shell
expand   Convert tabs to spaces
export   Set an environment variable
expr     Evaluate expressions
 
false    Do nothing, unsuccessfully
fdformat Low-level format a floppy disk
fdisk    Partition table manipulator for Linux
fgrep    Search file(s) for lines that match a fixed string
file     Determine file type
find     Search for files that meet a desired criteria
fmt      Reformat paragraph text
fold     Wrap text to fit a specified width.
for      Expand words, and execute commands
format   Format disks or tapes
free     Display memory usage
fsck     File system consistency check and repair
ftp      File Transfer Protocol
function Define Function Macros
 
gawk     Find and Replace text within file(s)
getopts  Parse positional parameters
grep     Search file(s) for lines that match a given pattern
groups   Print group names a user is in
gzip     Compress or decompress named file(s)
 
hash     Remember the full pathname of a name argument
head     Output the first part of file(s)
history  Command History
hostname Print or set system name
 
id       Print user and group id's
if       Conditionally perform a command
ifconfig Configure a network interface
import   Capture an X server screen and save the image to file
install  Copy files and set attributes
 
join     Join lines on a common field
 
kill     Stop a process from running
 
less     Display output one screen at a time
let      Perform arithmetic on shell variables
ln       Make links between files
local    Create variables
locate   Find files
logname  Print current login name
logout   Exit a login shell
look     Display lines beginning with a given string
lpc      Line printer control program
lpr      Off line print
lprint   Print a file
lprintd  Abort a print job
lprintq  List the print queue
lprm     Remove jobs from the print queue
ls       List information about file(s)
lsof     List open files
 
make     Recompile a group of programs
man      Help manual
mkdir    Create new folder(s)
mkfifo   Make FIFOs (named pipes)
mkisofs  Create an hybrid ISO9660/JOLIET/HFS filesystem
mknod    Make block or character special files
more     Display output one screen at a time
mount    Mount a file system
mtools   Manipulate MS-DOS files
mv       Move or rename files or directories
 
netstat  Networking information
nice     Set the priority of a command or job
nl       Number lines and write files
nohup    Run a command immune to hangups
nslookup Query Internet name servers interactively
 
passwd   Modify a user password
paste    Merge lines of files
pathchk  Check file name portability
ping     Test a network connection
popd     Restore the previous value of the current directory
pr       Prepare files for printing
printcap Printer capability database
printenv Print environment variables
printf   Format and print data
ps       Process status
pushd    Save and then change the current directory
pwd      Print Working Directory
 
quota    Display disk usage and limits
quotacheck Scan a file system for disk usage
quotactl Set disk quotas
 
ram      ram disk device
rcp      Copy files between two machines.
read     read a line from standard input
readonly Mark variables/functions as readonly
remsync  Synchronize remote files via email
return   Exit a shell function
rm       Remove files
rmdir    Remove folder(s)
rsync    Remote file copy (Synchronize file trees)
 
screen   Terminal window manager
scp      Secure copy (remote file copy)
sdiff    Merge two files interactively
sed      Stream Editor
select   Accept keyboard input
seq      Print numeric sequences
set      Manipulate shell variables and functions
sftp     Secure File Transfer Program
shift    Shift positional parameters
shopt    Shell Options
shutdown Shutdown or restart linux
sleep    Delay for a specified time
sort     Sort text files
source   Run commands from a file `.'
split    Split a file into fixed-size pieces
ssh      Secure Shell client (remote login program)
strace   Trace system calls and signals
su       Substitute user identity
sum      Print a checksum for a file
symlink  Make a new name for a file
sync     Synchronize data on disk with memory
 
tail     Output the last part of files
tar      Tape ARchiver
tee      Redirect output to multiple files
test     Evaluate a conditional expression
time     Measure Program running time
times    User and system times
touch    Change file timestamps
top      List processes running on the system
traceroute Trace Route to Host
trap     Run a command when a signal is set(bourne)
tr       Translate, squeeze, and/or delete characters
true     Do nothing, successfully
tsort    Topological sort
tty      Print filename of terminal on stdin
type     Describe a command
 
ulimit   Limit user resources
umask    Users file creation mask
umount   Unmount a device
unalias  Remove an alias
uname    Print system information
unexpand Convert spaces to tabs
uniq     Uniquify files
units    Convert units from one scale to another
unset    Remove variable or function names
unshar   Unpack shell archive scripts
until    Execute commands (until error)
useradd  Create new user account
usermod  Modify user account
users    List users currently logged in
uuencode Encode a binary file 
uudecode Decode a file created by uuencode
 
v        Verbosely list directory contents (`ls -l -b')
vdir     Verbosely list directory contents (`ls -l -b')
vi       Text Editor
 
watch    Execute/display a program periodically
wc       Print byte, word, and line counts
whereis  Report all known instances of a command    
which    Locate a program file in the user's path. 
while    Execute commands
who      Print all usernames currently logged in
whoami   Print the current user id and name (`id -un')
Wget     Retrieve web pages or files via HTTP, HTTPS or FTP
 
xargs    Execute utility, passing constructed argument list(s)
yes      Print a string until interrupted
 
.        Run a command script in the current shell
###      Comment / Remark

Thursday, March 10, 2011

Oracle Apps Implementing Key Flex field and Descriptive Flex field

This tutorial tells you about implementation and other features provided in the implementation section .

Implementing Flex fields

Key Flexfield

The basic steps in defining a key Flexfields are as given below. You may or may not use all the steps. The detailed explanation is being followed after the steps.

  • Identifying Key flexfields that are required for you Oracle Applications installation
  • Designing a Key flexfield structure
  • Selecting the appropriate Key flexfield to define
  • Defining structure information for the Key flexfield
  • Defining segment attributes
  • Defining flexfield qualifiers
  • Defining segment qualifiers
  • Implementing optional features as needed
To define the key Flexfield structure, you need to open the Key Flexfield segment form as shown in the figure 5 below. The navigation path is Application Developer à Flexfield: Key à Segments.



Figure 5. Key Flexfield Segments Form

Lets say you are defining the structure for an Accounting Flexfield. Query for the Flexfield Title “Accounting Flexfield” using the Flexfield Title window as shown in figure 5 above. If there are already existing structures for Accounting Flexfields, they would be listed in the Structures window as shown in figure 6 below.



Figure 6. Listing of existing structures for Accounting Key Flexfield

Lets say you want to define a new structure for the Accounting Flexfield with the structure code as “NEW_ACCOUNTING_STRUCTURE”. Enter the code name in the Code window and the title as “New Accounting Flexfield Struc” in the Title window. Enter an optional description for the new structure which may include the purpose of the new structure. Save the changes. The form would look like as shown in figure 7 below.




Figure 7. Structure definition for a new Accounting Flexfield

There are few check buttons on the form in the figure 7 above which can be left unchecked/checked as shown in the figure above.

The Enabled checkbox is checked by default. You can optionally uncheck it. You cannot delete a Key flexfield structure, but you can disable it by unchecking the Enabled checkbox. Next, you may select a Segment Separator other than the default period. Your choices are period, dash, pipe, or any custom character. You must have a segment separator.

Next, you can select whether you want to Cross-Validate Segments. Unchecking this checkbox will disable cross-validation for this Key flexfield structure. You can then identify whether you want to Freeze Rollup Groups. If you mark this checkbox, you will not be able to change the assigned rollup groups in the Define Segment Values form. As a last step, you can determine whether you want to Allow Dynamic Inserts for Key flexfield structures. If you do not allow dynamic inserts, you must create all flexfield combinations in the combination form.



You can freeze your flexfield structure by checking the Freeze Flexfield Definition checkbox. Once frozen, you can only make very limited changes to the flexfield structure definition. If you need to change the flexfield structure definition, first uncheck the Freeze Flexfield Definition checkbox and make the changes. Next, reactivate the Freeze Flexfield Definition checkbox. You will receive a warning message that tells you that unfreezing this flexfield and making changes to the segment definitions could affect the validity of the data already existing for this flexfield. Changing a Key flexfield structure will not update existing flexfield data. Do not freeze your flexfield structure yet, as you have not entered the segment attributes for your flexfield structure.
Once the above fields are defined click on the Seg­ments button at the bottom of the form. The new form would look like as shown in figure 8 below. Enter the values as shown in the form below. You can use the already defined Value Sets for the various segments. If you have not defined them earlier, they can be created using the Value Set button at the bottom of the form. Save the changes. To assign a flexfield qualifier to each segment, select the segment on the form and then click on the Flexfield Qualifiers button as the next step.



Figure 8. Accounting Flexfield Segment Structure form

Select the New Company segment and click on Flexfield Qualifier button. Check the Balancing Segment for the New Company structure as the flexfield qualifier. The form would look like as shown in figure 9 below. Follow the same steps to choose the flexfield qualifiers for the remaining 2 segments. Check Cost Center Segment for New Cost Center and Natural Account for New Account segments respectively. Save the changes and close the Structure form.



Figure 9. Flexfield Qualifier form

As the next step, the form shown in figure 7 would be visible now. Click on the Freeze Flexfield Definition button. Then compile the flexfield structure. You can compile your flexfield structure by hitting the Compile button. Compiling a flexfield structure will automatically save the flexfield structure. You will see the dialogue box as shown in figure 10 below. Choose OK on the dialogue box.



Figure 10. Compiling Flexfield Definition



Figure 11. Dialogue box for compilation of flexfield structure

Click on OK and the flexfield definition would be saved.

Sunday, March 6, 2011

What are Profile Options in Oracle Apps ?

What are Profile Options in Oracle Apps ?

Profile Options provide flexibility to Oracle Apps. They are a key component of Oracle Applications, hence these much be understood properly. I will be taking multiple examples here to explain what profile options mean. I will also try to explain by stepping into Oracle shoes "How will you design a program that is flexible", by using Profile Options.

Following that, if you still have questions regarding profile options, then leave a comment and I promise to respond. For the learners of Oracle Apps, understanding profile options is mandatory.

What is profile option?
The profile option acts like a Global Variable in Oracle.

Why does Oracle provide profile options?
These are provided to keep the application flexible. The business rules in various countries and various companies can be different. Hence the profile options are delivered by Oracle in such a manner to avoid hard-coding of logic, and to let the implementation team at site decide the values of those variables.

For screenshots of below listed examples in this article, please

Enough definitions, give me some scenarios where profile options are used by Oracle....
1. There are profile options which can turn the debugging on, to generate debug messages. Say one of 1000 users reports a problem, and hence you wish to enable debugging against just that specific user. In this case you can “Turn On” the debugging profile option "again that specific user".
2. There are profile options that control which user can give discount to their customers at the time of data entry. You can set profile option "Discount Allowed" to a value of either Yes or No against each Order Entry user.
3. Lets assume an Organization has department D1 and D2. Managers of both the Departments have "HRMS Employee View" responsibility. But you do not want Manager of D2 to be able to see the list of Employees in Organization D1. Hence you can set a profile option against the username of each of these users. The value assigned to such profile option will be "Name of the Organization" for which they can see the employees. Of course, the SQL in screen that displays list of employees will filter off the data based on “logged in users profile option value”.


Let’s take an example. Let’s assume you are a developer in Oracle Corporation building a screen in ERP. Let us further assume that you are developing an Order Entry screen.
Assume that business requirements for your development work is:-
1. Screen should be flexible to ensure that different users of the screen can give different levels of discounts. For example, a clerk Order Entry User can give no more than 5% discount. But Sales Manager can enter an Order with 15% discount.
2. There should not be any hard-coding regarding the maximum permissible discount.
3. In the screen there will be a discount field.
4. When the discount value is entered in discount field, an error will be raised if user violates the maximum permissible discount.

Here is how Oracle will code this screen
1. They will define a profile option named "OEPASSI Maximum Discount Allowed".
2. The short name of this profile option is "OEPASSI_MAX_DISCOUNT"
2. In the when-validate-item of the discount field(assuming Oracle Forms), following code will be written
IF :oe_line_block.discount_value > fnd_profile.value('OEPASSI_MAX_DISCOUNT')
THEN
message(
'You can’t give discount more than '
|| fnd_profile.value('OEPASSI_MAX_DISCOUNT') || '%' ) ;
raise form_trigger_failure ;-- I mean raise error after showing message
END IF ;

Here is how, the client implementing Oracle Order Entry will configure their system.
1. Navigate to System administration and click on system profile menu.
2. For Clerk User(JOHN), set value of profile "OEPASSI Maximum Discount Allowed" to 5
For Sales Manager User(SMITH), set value of profile "OEPASSI Maximum Discount Allowed" to 15


Question: This sounds good, but what if you have 500 Order Entry Clerks and 100 Order Entry Sales Managers? Do we have to assign profile option values to each 600 users?
Answer : Well, in this case, each Clerk will be assigned Responsibility named say “XX Order Entry Clerk Responsibility”
Each Sales Manager will be assigned Responsibility named say “XX Order Entry Sales Manager Responsibility”
In this case, you can assign a profile option value to both these responsibilities.
“XX Order Entry Clerk Responsibility” will have a value 5% assigned against it. However, “XX Order Entry Sales Manager Responsibility” will have a profile option value of 15% assigned.
In the when-validate-item of the discount field, following code will then be written
IF :oe_line_block.discount_value > fnd_profile.value('OEPASSI_MAX_DISCOUNT')
THEN
message(
'You can’t give discount more than '
|| fnd_profile.value('OEPASSI_MAX_DISCOUNT') || '%' ) ;
raise form_trigger_failure ;-- I mean raise error after showing message
END IF ;

Please note that our coding style does not change even though the profile option is now being assigned against responsibility. The reason is that API fnd_profile.value will follow logic similar to below.
Does Profile option value exist against User?
--Yes: Use the profile option value defined against the user.
--No: Does Profile option value exist against Responsibility
-----Yes: Use the profile option value defined against the current responsibility in which user has logged into.
-----No: Use the profile option value defined against Site level.

Profile Options Examples Screenshots

You have reached this page from Profile Options Training Article

Firstly, lets define the responsibility for Clerk, as we discussed in Article.

Next, lets define the sales manager responsibility, as we discussed in Article.


Lets define user JOHN, that is Clerk



And also, lets define user SMITH ( Sales manager )

Now, we need to define the profile option for discount, hence go to responsibility "Application Developer"

When you click on menu "Profile" above, you will then see below screen for defining profile option. Please note that the "Name" field is the short name of profile option, and it is this name used in API call to FND_PROFILE.value


Now, after having defined a profile option, its time to assign these to JOHN & SMITH.
Hence go to responsibility "System Administrator"



Click on Menu Profile/System, as below

The profile option assignment screen looks like below. Enter JOHN in USER, OEPASSI% in Profile, to select profile named "OEPASSI Maximum Discount Allowed"

Assign a value of 5 to the user.


Click on torch, to return to search screen as below


and this time we will assign value of 15 against user SMITH.

OK, what if we have too many clerks, we can also simply assign profile value to Responsibility of Clerk. Doing so, all the users that use this responsibility, will inherit profile option value against Responsibility.




Assign 5% max discount for Clerks

Now, lets select Sales Manager responsibility in profile screen

Search on this...as below......

Assign value 15% to Sales Manager responsibility.