5/18/12

How do we know whether we running Datastage jobs on SMP or MPP System:




Look in the Configuration file if the "fastname" has the same value for all given nodes then you are running on SMP.
If there are different "fastname's" then its MPP.
For Server jobs it won't matter if it is SMP or MPP because Server jobs execute only on the machine where Datastage installed.
See below in Bold.
Ex :
main_program: APT configuration file: /ibmiscode/Configurations/ETL/apt_config_max

  node "DEV1" { 
    fastname "DEV1" 
    pools "" 
    resource disk "/is_resource1/isent" {pools ""} 
    resource scratchdisk "/scratch1/sent" {pools ""} 
  } 


  node "local2" { 
    fastname "DEV1" 
    pools "" 
    resource disk "/is_resource2/isent" {pools ""} 
    resource scratchdisk "/scratch2/sent" {pools ""} 
  } 


  node "local3" { 
    fastname "DEV1" 
    pools "" 
    resource disk "/is_resource3/isent" {pools ""} 
    resource scratchdisk "/scratch3/sent" {pools ""} 
  } 


  node "local4" { 
    fastname "DEV1" 
    pools "" 
    resource disk "/is_resource4/isent" {pools ""} 
    resource scratchdisk "/scratch4/sent" {pools ""} 
  } 
}

5/9/12

CUT command unix/linux


CUT command :
i'm going to take below sample file for the examples shown.
-> cat test.txt
201200001|201200001|LIFE|A
201200002|201200002|STD|B
201200003|201200003|LTD|C
201200004|201200004|LTD|X
201200005|201200005|LTD|E

cut command will be used with the following options
  • cut -c
  • cut -d with -f
1) cut -c :

-> cut -c 11 test.txt
 the above command will give the 11th character from each line of the file
2
2
2
2
2

-> cut -c 11,12 test.txt
the above command will give the 11th and 12th characters from each line
20
20
20
20
20

-> cut -c 1-10 test.txt
the above command will give characters from 1 to 10 from each line
201200001|
201200002|
201200003|
201200004|
201200005|

-> cut -c -8 test.txt
the above command will return charaters from 1 to 8 from each like similary like above result
20120000
20120000
20120000
20120000
20120000

-> cut -c 10- test.txt

the above command will return charaters from 10th to end of the line from each line.
|201200001|LIFE|A
|201200002|STD|B
|201200003|LTD|C
|201200004|LTD|X
|201200005|LTD|E

2) cut -d with -f:
character followed by -d in the unix command is a delimeter either we can use in the quotes     (-d "|") or we can use with back slash after the -d ( -d\).

-f specifies the filed number to return

-> cut -d "|" -f3 test.txt
or we can use
-> cut -d\| -f3 test.txt
the above command returns 3rd filed in each line which have the pipe(|) as the delimeter
LIFE
STD
LTD
LTD
LTD
-> cut -d\| -f3,4 test.txt
the above command will return the 3rd and 4th filed from each line

LIFE|A
STD|B
LTD|C
LTD|X
LTD|E
-> cut -d\| -f3,5 test.txt
the above command only gives 3rd filed bcz there is no 5th filed
LIFE
STD
LTD
LTD
LTD

-> cut -d\| -f1- test.txt
the above command will return data from filed1 to the end of each line.

201200001|201200001|LIFE|A
201200002|201200002|STD|B
201200003|201200003|LTD|C
201200004|201200004|LTD|X
201200005|201200005|LTD|E
-> cut -d\| -f-3 test.txt
the above command will return data from field1 to field3 from each line.

201200001|201200001|LIFE
201200002|201200002|STD
201200003|201200003|LTD
201200004|201200004|LTD
201200005|201200005|LTD










5/3/12

Find If the file is in Unix format or DOS format :


We can find by using the 'od' command and 'grep' for carriage returns('\r') that usually exist in DOS format files.
Example : od -c filename.txt| grep'\\r'
if it won't show up anything then it is in Unix format.
Or we can use the following method also :
Example : grep -c '^M$' filename 
Note that ^M has to be typed with control-v and enter(Not by typing shift 6 and M)

5/2/12

How to Find the changes made by particular USER in DataStage :


How to Find the changes made by particular USER in Datastage :

Here is how -

  •  Go to Data stage Designer
  • from the Menu bar  Tools --> Advanced Find


Then Select filelds based upon your choice:


  • Name To find : * or part of the job name
  • Folder to search : select the particular folder you are looking for
  • Modified by User: Enter the user name of the datastage user.
  • Date  : select the date type


Then click Find.

It will give you the list of jobs modified by that particular USER.


5/1/12

How to Check the Disk Usage in Unix/Linux


Both Linux and Unix offers two commands for checking out free disk space

  • df command : Report file system disk space usage
  • du command : Estimate file space usage

$ df -h  /home/test

OR


$ df -k /home/test


Output :
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sdb1               20G   9.2G   9.6G  49% /
varrun                 393M   144k   393M   1% /var/run
varlock                393M      0   393M   0% /var/lock
procbususb             393M   123k   393M   1% /proc/bus/usb
udev                   393M   123k   393M   1% /dev
devshm                 393M      0   393M   0% /dev/shm
lrm                    393M    35M   359M   9% /lib/modules/2.6.20-15-generic/volatile
/dev/sdb5               29G   5.4G    22G  20% /media/docs
/dev/sdb3               30G   5.9G    23G  21% /media/isomp3s
/dev/sda1              8.5G   4.3G   4.3G  51% /media/xp1
/dev/sda2               12G   6.5G   5.2G  56% /media/xp2
/dev/sdc1               40G   3.1G    35G   9% /media/backup

du Command :

du shows how much space one ore more files or directories is using.

  $ du -s /home/test
Output : 75224 /home/test