Pages

Recently Viewed

Wednesday, October 12, 2011

Soft Link or Symbolic Link

S Link ( soft link or symbolic link) is required to read a shell script (.prog file) through a concurrent program.
We create a concurrent program of executable type as HOST. The host file extension is .prog. We must have to create a soft link to access this host file.

Host File Location – It is available at bin folder on custom top. ($XXXXX_TOP/bin)


Soft Link Creation  ln -s  $FND_TOP/bin/fndcpesr  sourcefile
 ln -s  $FND_TOP/bin/fndcpesr  $v_custom_top/bin/XXXXX_TEST_SOFTLINK

The above command will create the soft link for XXXXX_TEST_SOFTLINK.prog file. The new link will look as below – 




Known Issues – Sometime concurrent program could not read the soft link, though it is available.  Below is the error message can be found in log file
FND-CP-ESP: Child: exec:: No such file or directory
/oracle/…/…/xxxxx/12.0.0/bin/XXXXX_TEST_SOFTLINK
Program exited with status 1

Root Cause – This issue appear if there is any control M character in prog file, which is the source for soft link.
Check for control M Char -$ ./XXXXX_TEST_SOFTLINK.prog
if output is file contents => No control M character available
if output has control M Char => 

Resolutions – Remove the control M character and re create the soft link.
1)      Delete the existing soft link   >>$  rm    XXXXX_TEST_SOFTLINK  
2)      Remove the control M character >>$ cat    XXXXX_TEST_SOFTLINK.prog | col -b >  XXXXX_TEST_SOFTLINK1.prog
3)   Delete the existing prog file  >> rm XXXXX_TEST_SOFTLINK.prog
4)   Rename the new prog file to old  >>$  mv     XXXXX_TEST_SOFTLINK1.prog  XXXXX_TEST_SOFTLINK.prog
4)      Re create the soft link for XXXXX_TEST_SOFTLINK.prog

**PS – Do not copy prog file in  binary mode or zipped mode to server. It may include control M character to prog file.

3 comments:

  1. Thanks for your comments. It helped me in removing the control M characters. Also, best way to check control M characters is :

    cat -v *.prog

    ReplyDelete
  2. Good that it helps. and thnx for sharing the useful info.
    Also we can use dos2unix command to rermove control M char from file.

    dos2unix a.prog ==> This will remove if any such character available

    http://oa-learning.blogspot.in/#!/2013/10/remove-control-m-character-from-unix.html

    ReplyDelete