Search This Blog

Friday, May 1, 2015

Enabling and Disabling FND Debug from Backend


Basically Two reasons why we need to enable/disable FND debug from backend.
1.When trying to enable “FND: Debug Log Enabled”, in the below window, it might gray out and may not allow you to change it.
Capture

2. Sometimes it happens when you see something like “FND Debug Enabled, this might reduce the performance” on the Login Screen, that time it becomes difficult to disable it from front end, as you may not be able to navigate or open the profile option form.
——————————-  Come'on Lets play now  ——————————–

-------------------------------------------------------------------------------------------------------------------------------------------------------------------
To Enable FND DEBUG
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

SQL> SELECT PROFILE_OPTION_ID,PROFILE_OPTION_NAME FROM FND_PROFILE_OPTIONS_VL
WHERE START_DATE_ACTIVE <= SYSDATE
and NVL(END_DATE_ACTIVE,SYSDATE) >= SYSDATE
and ( SITE_ENABLED_FLAG = 'Y' or APP_ENABLED_FLAG = 'Y'
or RESP_ENABLED_FLAG = 'Y' or USER_ENABLED_FLAG = 'Y'
or SERVER_ENABLED_FLAG = 'Y' or SERVERRESP_ENABLED_FLAG = 'Y'
 or ORG_ENABLED_FLAG = 'Y')
and ( UPPER(USER_PROFILE_OPTION_NAME) LIKE '%FND%DEBUG%'
and (USER_PROFILE_OPTION_NAME LIKE '%f%' or
USER_PROFILE_OPTION_NAME LIKE '%F%'))
order by user_profile_option_name;


PROFILE_OPTION_ID PROFILE_OPTION_NAME
—————– ———————————–
4176         AFLOG_ENABLED
3098       AFLOG_FILENAME
3099       AFLOG_LEVEL
8470       AFLOG_BUFFER_MODE
3100       AFLOG_MODULE
8468 DEBUG RULE THRESHOLD
6 rows selected.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Note Down this Profile_option_id for “AFLOG_ENABLED”
Now Execute another sql which will let you know the Value of that PROFILE_OPTION
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL> 
col profile_option_value for A20;
col profile_option_id for 999999999;
select PROFILE_OPTION_ID, PROFILE_OPTION_VALUE from FND_PROFILE_OPTION_VALUES
where profile_option_id in ('4176','3098','3099');
SQL>
--------------------------------------------------------------------------------------------------------------------------
Now Update the Status as follows:
--------------------------------------------------------------------------------------------------------------------------
SQL> update FND_PROFILE_OPTION_VALUESset PROFILE_OPTION_VALUE = 'Y' where PROFILE_OPTION_VALUE = 'N'and PROFILE_OPTION_ID = 4176;
SQL> Commit;
Commit complete.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
** To disable it, just set it to NO again  **
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
SELECT PROFILE_OPTION_ID,PROFILE_OPTION_NAME FROM FND_PROFILE_OPTIONS_VL
WHERE START_DATE_ACTIVE <= SYSDATE
and NVL(END_DATE_ACTIVE,SYSDATE) >= SYSDATE
and ( SITE_ENABLED_FLAG = 'Y' or APP_ENABLED_FLAG = 'Y'
or RESP_ENABLED_FLAG = 'Y' or USER_ENABLED_FLAG = 'Y'
or SERVER_ENABLED_FLAG = 'Y' or SERVERRESP_ENABLED_FLAG = 'Y'
or ORG_ENABLED_FLAG = 'Y')
and ( UPPER(USER_PROFILE_OPTION_NAME) LIKE '%FND%DEBUG%'
and (USER_PROFILE_OPTION_NAME LIKE '%f%' or USER_PROFILE_OPTION_NAME LIKE '%F%'))
order by user_profile_option_name

 PROFILE_OPTION_ID    PROFILE_OPTION_NAME
—————–    ——————-
4176       AFLOG_ENABLED3098       AFLOG_FILENAME3099       AFLOG_LEVEL8479       AFLOG_BUFFER_MODE3100       AFLOG_MODULE8465       DEBUG RULE THRESHOLD

select PROFILE_OPTION_ID, PROFILE_OPTION_VALUE from FND_PROFILE_OPTION_VALUES
where profile_option_id in ('4176','3098','3099');
PROFILE_OPTION_ID PROFILE_OP
—————– ———-
3099       1
4176       Y
3098       NULL
SQL> update FND_PROFILE_OPTION_VALUESset PROFILE_OPTION_VALUE = 'N'where PROFILE_OPTION_VALUE = 'Y'and PROFILE_OPTION_ID = 4176;  => AFLOG_ENABLED will show ‘N’ now

I Hope this will definitely help you !!!
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
-v3nom
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sunday, April 26, 2015

VI editor Tips and Tricks

vi editor in Linux is the best tool to create / edit a file. It has got more functions then any other Linux Editor (if you don't have access to GUI).
I am trying to keep this post as simple as I can. If you have any doubt or queries please ask.
In this post we will cover some exciting tricks and methods which I bet will be quite effective. 
I have categorized them in the following topics.
Now lets check them one by one.

---------------------------------------------------------------------------------------------------------------------
changing text
ccchange a line
Cchange from current cursor position to the end-of-line
cwchange from current cursor position to the end of the word
Jjoins the next line to the current line (inserts a space between the two)
gJjoins the next line to the current line (without a space)
:12,24jjoin lines 12 thru 24, leaving a space between each line.
~switch lower and upper cases
rreplace the current character with the next character typed
4rxreplace next four characters with "x"
Roverwrite until <esc>
ssubstitute the current character and go into insert mode. Same as "rxi <ESC>"
Ssubstitute the current line, erase it, and go into insert mode, starting at the indentation of the line. Same as "cc"
>>shift current line forward
3>>shift three lines forward
>%shift all lines until a matching brace or parenthesis
>}shift to the end of the paragraph
>'mshift to the marked line
<<shift current line backward
vEUchange from here to end of word to uppercase
vEuchange from here to end of word to lowercase

--------------------------------------------------------------------------------------------------------------------
copying and pasting (We call yanking for Copying anything in Linux)
ylyank (copy) current character
ynyank n characters
ywyank the current word
yyyank the current line
Yyank a line, same as "yy"
nyyyank n lines of text
y$yank to end of line
y)yank to the end of the sentence
y'xyank from current line to the mark x (use mx to mark as x)
y/wordyank from current position to "word"
"ay'myank from here to the mark. Place this into the named buffer "a". This will also allow one to switch files using the ":e fn" or ":n fn" command and then place the buffer back.
"ayyyank current line into buffer a.
"a3Yyank three lines, place into buffer "a"
"A3Yappend 3 lines, place into "a". This allows one to build up a buffer.
"appaste the contents of "a" back, below current line.
"zyy
@z
"zyy places the highlighted text into buffer z@z will run the contents of buffer z. This allows a search pattern to be written in the document and then reused.
ppaste to the right of the cursor
Ppaste to the left of the cursor
---------------------------------------------------------------------------------------------------------------------
deleting
xdelete the character under the cursor
dddelete the current line
d^delete from current cursor position to the beginning of the line
d$delete from current cursor position to the end of the line
dwdelete from current cursor position to the end of the word
d3wdelete three words
3dddelete three lines
d/worddelete until you find word
dfxdelete from here until the character "x"
Ddelete everything to the end of the current line (same as d$)
3dddelete everything to the end of the current line and the following 2 lines
uundo deletion
Uundo the line you just changed

---------------------------------------------------------------------------------------------------------------------
inserting
iinsert at the current character
Iinsert at the beginning of the current line
20i- <ESC>insert 20 dashes (-)
aappend to the right of the current character
Aappend at the end of the current line
oinsert a new line immediately following the current line
Oinsert a new line immediately before the current line

---------------------------------------------------------------------------------------------------------------------
moving
hmove the cursor one character to the left
jmove the cursor one character down
kmove the cursor one character up
lmove the cursor one character to the right
0move cursor to the beginning of the current line
$move cursor to the end of the current line
wmove cursor forward a word
3wmove cursor forward three words
Wmove cursor forward, ignoring punctuation
bmove cursor back a word
Bmove cursor back a word, ignoring punctuation
emove cursor to the end of the word
Emove cursor to the end of the word, ignoring punctuation
Gmove cursor to the last line of the file
nGmove cursor to the beginning of line n
1Gmove to the first line of a file
n|moves the cursor to the beginning of column n
ffind a character in the line, forward
fafind the character "a" in the line, forward
2fafind the second occurrence of "a" in the line, forward
Ffind a character in the line, backward
Fzfind the character "z" in the line, backward
tfind up to a character in the line, forward
)jump to the next sentence
}jump to the next paragraph
]jump to the next section
%find matching brace or parenthesis
^bscroll backwards one page. A count scrolls that many pages
^fscroll forwards one page. A count scrolls that many pages
^uscroll up half a screen
^dscroll down half a screen
z <enter>put current line at top of screen
z.put current line at middle of screen
z-put current line at bottom of screen
mstart a mark, the next character is the name, any character from a-z
mamark this spot with the character "a"
'areturn to the line marked "a"
`areturn to the character marked "a"
''return to previous line (auto-mark)
``return to previous character (auto-mark)
---------------------------------------------------------------------------------------------------------------------
search and replace
/wordsearch forward for word
?wordsearch backward for word
?word?z.
search forward for word, put line at the middle of screen
njump forward to next occurance of word
Njump backward to next occurance of word
*search forward for word under cursor (vim)
#search backward for word under cursor (vim)
g*search forward for word under cursor (partial match) (vim)
g#search backward for word under cursor (partial match) (vim)
:nohstop highlighting the word that was searched for
:s/old/new/replaces first occurence of old with new on current line
:s/old/new/gglobally replaces old with new on current line
:%s/old/new/gglobally replaces old with new on all lines
:s/old/new/gcconfirms replacements
:%s/^V^M//gglobally remove DOS carriage returns
:%s/,/^V^M/gglobally replace commas with newlines (yes, I know this looks like it would insert DOS carriage returns, but it only inserts the newlines on Unix)
:%s/\s*$//strip blanks from end of lines
:%s/^.\{30}//remove the first 30 characters from each line
:%s/[ ^I]*$/!dremove trailing whitespace (where ^I is produced by pressing the tab key)
:%s/.*/\L&/convert the entire file to lowercase.
:s/.*/\u&/convert the first character of line to uppercase.
:%s/\<./\u&/gconvert the first character of each word to uppercase
\< matches the start of a word;
. therefore matches the first character of a word;
\u tells Vi(m) to uppercase the next character in the substitution string;
& means substitute whatever was matched on the lhs;
:s/book{./\L&/convert the first character after the { to lowercase.
:'x,.s/\([a-z]\)=/\1 =/replace any lowercase character in the alphabet followed by an equal sign with the same character followed by a space and an equal sign, e.g., book= >> book =
::%s/\(That\) or \(this\)/\2 or \1/change "that or this" to "this or that"
::%s/\(^\\foilhead{\(.*\)}\)/
%\1^M\\section{\2}/
comment out each line beginning with '\foilhead' and replace with a line beginning with '\section'; note the nested backreferences for keeping the rest of the line the same
::%s/\(.*\)/<a href="\1">\1<\/a>/add HTML tags for references to files
:s/ \(\d\{1,2}\)\.\(\d\{1,2}\)\(.*\)/<a href="\1-\2.sh">\1.\2\3<\/a>change a line of the form
       1.1 Accessing Substring
to
       <a href="1-1.sh">1.1 Accessing Substrings</a>
:'x,.s:^\([^ ]\+\) \(.*\):
<\1>\1 \2<\/\1><br>:
change a line of the form
       KBD used for text to be typed by the user
to
       <KBD>KBD used for text to be typed by the user</KBD><br>
Colons are used here instead of the usual slashes for separating the 'find' and 'replace' parts. The part ^\([^ ]\+\) finds all of the characters up to the first space and saves them for use in the 'replace' part as \1.
:'x,.s/^/#/insert a pound sign (#) at the beginning of the line from the line marked with mx to the current line
:%s/word1\nword2//remove word1 from the end of a line and word2 from the beginning of the next line; \n represents the newline between the two
:&repeat previous substitution
:<up arrow>recall : history
:g/string/ddeletes every line that contains string
:g/\.c/+|s/^/\.cc/look for all ".c" commands, jump to next line, substitute the beginning of line with ".cc".
:g/^\..*/|s//\U&/convert all characters at beginning of line that start with a "." to upper case.
:v/string/ddeletes every line that does not contain string
:g/.*/m0This will reverse the order of the lines in the current file. m0 is the ex command to move the line to line 0.
:v/./d or :g/^$/dRemove all blank lines.
:g/^\s*$/dRemoves all lines that only have whitespace.
:v/./.,/./-1joinReplaces multiple blank lines with just one blank line.

---------------------------------------------------------------------------------------------------------------------
options
:se aiautoindent (unset with :se noai)
:se ff=unixset fileformat to unix
:se icignore case when searching.
:se listdisplay tabs and carriage returns
:se nudisplay line numbers in the file. They are not actually in the file. (unset with :se nonu)
:se smshow matching brace or parenthesis while inserting
:se smddisplay the mode
:se sw=2set shifting to 2 spaces
:se tabstop=4set tabs to 4 spaces
^^Dturn off autoindent for current line, resume same place for the next line (up carrot and control-D)
0^Dreset the autoindent, start at the left margin

---------------------------------------------------------------------------------------------------------------------
external commands
!cmdexecute an external program
!!cmdexecute an external program, replacing the output with the results
!$send from here to the end-of-line
!Lsend from here to the last line of screen
!23Gsend from here to line 23
!/wordsend from here until you find "word"
!)send from here until the next sentence
!}send from here until the next paragraph
!!dateadds the date
!!cut -c41-cut the first 40 characters from a file
3!!sortsend three lines to sort, and return the output
!Grevsend from here to the end of file to the "rev" command; the results will reverse the characters in each line
!}sortsends from the current line until the first blank line to sort
:'x,.!sortwill sort from the line marked with mx to the current line
:r !llread the output of an "ll" command, and put it after the current line.
:'t,'b !spellcheck spelling from mark t to mark b
:'t,. !awk '{print $3 " " $2 " " $1}'reverse the order of three columns
:%! sed Gdouble space the entire file.
:1,5! sed Gdouble space the lines from 1-5
:'x,.!sed '/^$/d'remove the blank lines from mark x to the current line

---------------------------------------------------------------------------------------------------------------------

miscellaneous

^ggive file name, status, current line number and relative position
^lrefresh the screen (sometimes `^P' or `^R')
^vvisual mode. in Windows, Ctrl-v is mapped to paste text. Use Ctrl-q instead (vim)
.repeat latest command
&repeat latest `ex' substitute command, e.g. :s/wrong/good/
:ab lg longercreate an abbreviation. Whenever lg is typed, it will be replaced with longer.
vi +/string filenamestart vi, jumping to the first occurrence of string
vi -r filenamerecovers an open file after a crash
vi `cat somefile`open a list of files that are in the file somefile
:r filenameinsert file filename, placing its contents after current line
:1,4w filenamewrite lines 1 through 4 to filename
:e filenameedit filename
:f filenamechange current file name to filename
:nedit next file
:shcall up the shell, run commands until a ^d (CONTROL-d), then return to editing
:viVI MODE. Used if "Q" is pressed, or called up ex, and now wish to use the visual mode
In Insert mode, press the Ctrl-p or Ctrl-n key to complete part of a word that has been typed. This is useful for entering function names.
:<up arrow>recall : history
----------------------------------------------------------------------------------------------------------------------
References:
  1. vi Fast Reference Guide — the motherload of vi commands
  2. Vim documentation: starting
  3. Vi IMproved — VIM
  4. Best of VIM Tips
----------------------------------------------------------------------------------------------------------------------


Sunday, January 4, 2015

Commitment towards the Life...! The Work-life balance.

Today's post is about the life a DBA and every other person must commit to.

From my past experiences I can say that, the life of a DBA can be very enjoyable one, if we follow some rules and be under our boundaries.
To be something, you have to keep hold on somethings, you have to keep somethings ON HOLD until you achieve your desired goal. You may need to work hard, or work smart to deal with your personal and professional life. One of my friend Aniket (Professional Network Engg.), his experiences and my thoughts helped me to come up with some of these points. So lets get started with these points.

These are the  Points we shall always keep in Mind while working:

1. Self Confidence

    Its the term what everyone writes in his/her resume. But the fact is only 20% people follow this rule sincerely. When it comes to compromise the work with your personal life, most people go with the flow of their personal matters. Personal matters drives you, but also they affect your professional life and your career growth.
   What I say is just not to commit anything in your personal life unless you achieve your professional goal what you desire for. And that will absolutely make you achieve your professional goal, and I bet it will make you work for your personal goal. So just SHOW confidence while you are working. Always achieve whatever comes in your way.


2. Be Ambitious

     Always try to do something more. What so ever you can do, to make it better!
Try to excel in your field. This statement is small, but when it comes to your work, you may think of lot many things and ultimately you see a bigger problem, as your field is vast.
So now what I suggest is, to start with you current task, and keep on digging it up. FULL STOP. Just keep on digging the enhancement you can make. I know it may take time, but you will get atleast an hour to think about it apart from your regular routine, and if not, just spend 10 Mins to think about it, just jot down every single possibility you can come up with.

One of the Saying, that keeps me motivated is "Try to break your own record everyday". I personally follow this.


3. Self Respect

    This term can be taken it two ways, one which will led you to right way, and another that will led to be arrogant and selfish.

I would say, that you must keep your ego aside if and only if you want to be successful. Now, lets come to the point.

Self Respect, to respect ourselves. To respect what you do, To respect what you did, and to respect what you can/will do.

Be responsible for your deeds,  Whatever decision you make, just make sure, that it will be true in all the cases. And its NOT BAD if you are proved wrong in some of them, just correct them and make changes. Don't be shy, just be confident.


4. Take Opinion

    It is always advisable to take opinion from your seniors, even if you think he is not correct. Just take opinion. Then research and act upon.
If it feels like you are asking something stupid, still ask, ASK FOR MORE. And you may get something extra out of it.
Whatever the front personal think about that topic, you will get a view. Take opinions and make your decisions wisely.


5. Believe in Yourself.

  Every human in this world, is here because he is important to play his/her role. You can be right or wrong for every individual. It always depends upon the perspective you hold. If you are low to take it, then you will lose, and if you are confident then you will achieve it.

This point is most important and dependent upon all the points stated above. While making decisions, always think in both ways, about its adverse and its positive effects.
If you master you technology, and above given points of life. You will certainly make decision which will be good for you, and for your surrounding.
And everyone looks for a better environment to work in. So why not make one. Make it yourself.



That's all for today.
The Better You, the Better will be your environment.
-V3nom


Monday, December 29, 2014

Why Shall I be a DBA???

This post is mainly for the Freshers and for the beginners in the field of Database.....

Task of DBA is equivalent to the Events in life of an individual.

For the freshers, this is my first question. Why you want to be a DBA?

Well this has been asked to me several times, from my friends and from the interviewers...

Well for me, I just wanted a job, as I was fresher in IT field. Later when I was going thought the Oracle DBA Course, I understood what RDBMS is, and what's it importance. Well simply in a sentence I will explain it. "It's the record of Data, action or reaction you give while you are on the internet."  Let's take an example:
"Beginning from the world famous site GOOGLE, whatever you browse, search, everything is recorded in the GOOGLE database."

Well if you are bored enough reading this,,,,, Lets come to the point.

Database is the record of each and every transaction, and DBA is a person who holds the key to preserve this data. This data can be important to anyone, to GOOGLE or any other client.

But, to be a DBA, you need certain things, Lets keep these points in mind:

1. Be Focused, Just concentrate on the GOAL (This is an important thing which you must concentrate throughout you life )

2. Be Responsible (Take ownership of task, take everything seiously)

3. Time  (Give time, and try to reduce the time to resolve every problem)

4. Be Truthful (Never, never, never lie in your life, as you will be caught anyhow, if anyone wants to.)

5. Don't Panic (Take everything seriously, but don't panic, Decide what you wants to do, Make an Action Plan and estimate the time and ask for 1.5 times the decided time, so that if any problem comes in between, then you must be able to resolve it anyhow  ;)   )


That's all for today. Just keep this in mind.


-Next post will be the starting of the DBA course right from the beginning... and that will be free of cost. And that will be in sequence.


All your doubts and questions will be answered timely.

Thanks Folks,
-Venom  (That's What My Screen Name is)

Tuesday, December 16, 2014

Something about Rapid Cloning Part 1 - Database


During the interviews this is always asked, like "Tell me how do you do the Cloning in R12?"
We all know what happens in Cloning, but now we shall also know how is it done internally.
So I thought I shall dig up some information about how oracle works, whats the idea behind.
Starting with the few basic statements that we might have heard alot. I will put them in a question/answer pattern. 
In this post I am focusing only on the Database part. 


Q: Why do we need to do cloning?
-> To test some application by patching or coding which can affect the whole application or may need downtime for the process to be carried out. So, in order to avoid the loss in business due to these mentioned factors, we need to clone the Oracle Application.

Q. What are the different cloning methods supported by Oracle?
-> There can be many cloning methods but oracle supports only 1, i.e., RAPID CLONE.
      On the basis of Config.  We can divide them as
            1. With AUTOCONFIG. (Completely replaced by Rapid Clone now.)
            2. Without AUTOCONFIG. (
used before 11.5.5)

Q.  What is the need to run adpreclone?
-> This will create the staged clone directory which will be having the driver files and configuration file (XML File) of the source.

Q: How does adpreclone.pl dbTier will run

->   After runnning this, it will go in two stages
            1. dbTechStack                       2. Database

Q: Explain dbTechStack and Database in details:
-> It will create stage cloned area at $ORACLE_HOME/appsutil/clone This clone directory has got following main directories
data,jre,bin,db,html,context
This will prepare the database techstack at dbTechStack stage.
  1. Creates template files at $ORACLE_HOME/appsutil/template
  2. Creates driver files at $ORACLE_HOME/appsutil/driver/instconf.drv
  3. Converts inventory from binary to xml
Now the database stage:
      It will prepare database at the database stage. Major activities includes
  1. Create database control file script
      $ORACLE_HOME/appsutil/clone/context/data/stage/addbhomsrc.xml
      $ORACLE_HOME/appsutil/clone/context/data/stage/adcrdb.zip
       adcrdbclone.sql

  2. Generates database creation driver file
$ORACLE_HOME/appsutil/clone/context/data/driver/data.drv

  3. Copy JDBC Libraries
$ORACLE_HOME/appsutil/clone /clone/jlib/classes111.zip

________________________________________ 
NOW adcfgclone.pl dbTier (On TARGET NODE)

This will also run in two modes
     1. dbTechStack stage: 
It will make use template and driver files which were created during preclone process. And it will run the following scripts
      adchkutl.sh
      adclonectx.sh
      runInstallConfigDriver -
located in $ORACLE_HOME/appsutil/driver/instconf.drv
      Relinking of ORACLE_HOME/appsutil/install/adlnkoh.sh  
     2. Now for the Database Stage
            Driver File       $ORACLE_HOME/appsutil/clone/context/data/driver/data.drv
            Create Database using adcrdb.zip file
            Autoconfig is Run
            Controlfile is created using adcrdbclone.sql
     3. Generates database creation driver file
$ORACLE_HOME/appsutil/clone/context/data/driver/data.drv
     4. Copy JDBC Libraries
$ORACLE_HOME/appsutil/clone /clone/jlib/classes111.zip

Ok, Now you can sleep and dream about the cloning.
-----------  That's it ------

Friday, December 23, 2011

Basics of VI Editor of Linux


_________________________________________________________________________________

                       Opening a file     


vi filename: Creating text
Edit modes: These keys enter editing modes and type in the text
of your document.

i     Insert before current cursor position
I     Insert at beginning of current line
a     Insert (append) after current cursor position
A     Append to end of line
r     Replace 1 character
R     Replace mode
<ESC> Terminate insertion or overwrite mode
_________________________________________________________________________________

                 Deletion of text


x        Delete single character
dd      Delete current line and put in buffer
ndd    Delete n lines (n is a number) and put them in buffer
J        Attaches the next line to the end of the current line (deletes carriage return).
u        Undo last command
_________________________________________________________________________________

                 CUT AND PASTE


yy      Yank current line into buffer
nyy    Yank n lines into buffer
p        Put the contents of the buffer after the current line
P       Put the contents of the buffer before the current line
_________________________________________________________________________________

                CURSOR POSITIONING

^d              Page down
^u              Page up
:n               Position cursor at line n
:$               Position cursor at end of file
^g               Display current line number
h,j,k,l          Left,Down,Up, and Right respectively. 
                  Your arrow keys should also work if your keyboard mappings are anywhere near same.
_________________________________________________________________________________

                STRING SUBSTITUTION


:%s#string1#string2#[g]       Substitute string2 for string1 on lines n1 to n2. If g is included (meaning global), 
                                           all instances of string1 on each line are substituted. If g is not included,only
                                           the first instance per matching line is substituted.
    
    ^ - matches start of line
    . - matches any single character
    $ - matches end of line

These and other "special characters" (like the forward slash) can be "escaped" with \
i.e to match the string "/usr/STRIM100/SOFT" say "\/usr\/STRIM100\/SOFT"

Examples:

:1,$:s/dog/cat/g                   Substitute 'cat' for 'dog', every instance
                                   for the entire file -lines 1 to $ (end of file)

:23,25:/frog/bird/                 Substitute 'bird' for 'frog' on lines
                                   23 through 25. Only the first instance
                                   on each line is substituted.
_________________________________________________________________________________

              SAVING, QUITTING and other "ex" Commands


These commands are all prefixed by pressing colon (:) and then entered in the lower left corner of the window. They are called "ex" commands because they are commands of the ex text editor - the precursor line editor to the screen editor
vi. You cannot enter an "ex" command when you are in an edit mode (typing text onto the screen)
Press <ESC> to exit from an editing mode.

:w                         Write the current file.
:w new.file             Write the file to the name 'new.file'.
:w!                        Existing.file Overwrite an existing file with the file currently being edited.
:wq                       Write the file and quit.
:q                          Quit.
:q!                         Quit with no changes.
:e filename             Open the file 'filename' for editing.
:set number            Turns on line numbering
:set nonumber        Turns off line numbering

_________________________________________________________________________________