We have moved to www.dataGenX.net, Keep Learning with us.

Tuesday, February 26, 2013

Interview Questions : Unix/Linux : Part-6

1.       How do you write the contents of 3 files into a single file?
cat file1 file2 file3 > file

2.       How to display the fields in a text file in reverse order?
awk 'BEGIN {ORS=""} { for(i=NF;i>0;i--) print $i," "; print "\n"}' filename

3.       Write a command to find the sum of bytes (size of file) of all files in a directory.
ls -l | grep '^-'| awk 'BEGIN {sum=0} {sum = sum + $5} END {print sum}'

Monday, February 25, 2013

FTP auto-login Script

FTP auto-login.  "ftp" to a site and have the password stored.

For instance, here's a sample ".net" file in a user's home directory for uploading to sourceforge. Note, sourceforge will take any password, so m@temp.com is used here for login "anonymous".

Wednesday, February 20, 2013

Changing Logs method in DataStage

DataStage logging was changed at release 8.1 to log job run detail records into the operational repository, (xmeta) rather than the local project level log files, (RT_LOGxxx).
In case XMETA repository logging causing problem (i.e not visible from designer), we able to change the logging method back to local project log files.

Monday, February 18, 2013

Physical Data Model

              Physical data model represents how the model will be built in the database. A physical database model shows all table structures, including column name, column data type, column constraints, primary key, foreign key, and relationships between tables. Features of a physical data model include:

Friday, February 15, 2013

DataStage Error: Job xxx is being accessed by another user

DataStage Error:  Job xxx is being accessed by another user  

Take below steps to get rid of locks in datastage --

Thursday, February 14, 2013

DataStage Unix processes

Following are unix process list for a healthy DS system (Engine + Services + Metadata repository)

Process: /opt/IBM/InformationServer/ASBNode/apps/jre/bin/java
Class: com.ascential.acs.logging.agent.LoggingAgentSocketImpl

Tuesday, February 12, 2013

RPM Commands in Linux

Install an RPM Package   

RPM packages have file naming conventions like package-5.1-7.i868.rpm, which include the package name (package), version (2.0), release (4), and architecture (i386). Also notice that RPM understands FTP and HTTP protocols for installing and querying remote RPM files.

rpm -ivh package-5.1-7.i868.rpm
rpm -i ftp://ftp.redhat.com/pub/redhat/RPMS/package-1.0-1.i386.rpm
rpm -i http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm

Monday, February 11, 2013

uvodbc.config File

This is a Part of  ODBC Configuration in DataStage tutorial.

Update the uvodbc.config File

The uvodbc.config is located in the root of the project directory (The project directory can be determined by opening DataStage Administrator, clicking on the Projects Tab, selecting the project)
This steps simply adds the datasource to the drop down list on the ODBC Import Screen

Thursday, February 07, 2013

.odbc.ini EXAMPLE file

This is a Part of  ODBC Configuration in DataStage tutorial.
This is Example file of .odnc.ini

[ODBC Data Sources]
TESTDB=DataDirect DB2 Wire Protocol Driver
DB2 Wire Protocol=DataDirect DB2 Wire Protocol Driver
dBase=DataDirect dBaseFile(*.dbf)
Informix=DataDirect Informix

.odbc.ini file in DataStage

This is a Part of  ODBC Configuration in DataStage tutorial.

Update the .odbc.ini File

The .odbc.ini file creates the relationship between the datasource name and the odbc driver that is supposed to be used to connect to it.

The .odbc.ini file is located in the DSHOME directory

Tuesday, February 05, 2013

ODBC Configuration in DataStage

For configure the DataStage ODBC connections, need to edit three files to set up the required ODBC connections. These are:
  • dsenv
  • .odbc.ini
  • uvodbc.config
All three are located in the $DSHOME directory. Copies of uvodbc.config are also placed in the project directories.

Monday, February 04, 2013

14 Good design tips in Datastage

1) When you need to run the same sequence of jobs again and again, better create a sequencer with all the jobs that you need to run. Running this sequencer will run all the jobs. You can provide the sequence as per your requirement.

2) If you are using a copy or a filter stage either immediately after or immediately before a transformer stage, you are reducing the efficiency by using more stages because a transformer does the job of both copy stage as well as a filter stage