Something about DataStage, DataStage Administration, Job Designing,Developing, DataStage troubleshooting, DataStage Installation & Configuration, ETL, DataWareHousing, DB2, Teradata, Oracle and Scripting.
Showing posts with label commands. Show all posts
Showing posts with label commands. Show all posts
Wednesday, July 15, 2015
Error while creating new jobs in DataStage
If you face the error error similar to below can occur when trying to save a newly created job:
Error On CREATE.FILE command
Creating file "RT_CONFIG4817 as type 30, mkdbfile: connot create file
RT_CONFIG4817. Unable to create operating system file "RT_CONFIG4817"
Thursday, April 23, 2015
Script to UnLock DataStage Jobs
This script will help you to unlock the all jobs, if you are a DS admin, or your datastage jobs , if a DS developer, without doing human error while executing command on Datastage server UV shell or Datastage Administrator Client.
Script is quite simple, Execute it , it will ask for Project Name and Job Name and Done if you have appropriate access on Datastage server.
May be need a modification as per your Datastage platform or if you need some fancy stuff to add on. Happy Scripting !!
Tuesday, February 17, 2015
DataStage UNIX Commands
I've been asked so many times for Unix/Linux command which we usually used in DataStage. Here, I have tried to compile them together, please let me know if I missed something here. Njoy ....... :)
•Check the permissions
1.Log on to server as dsadm or root
2.cd $DSHOME/bin
3.ls -l | grep rws
The output should be (6) files owned by root with the setuid bit set -- especially the uv file.
Wednesday, February 04, 2015
Modify Stage - TRIM function
For trimming spaces or a char from a string can be done in modify stage. Below, I have shared the function syntax and some example, go Play ;-)
string_trim[character,direction,justify](string)
or
string_trim[character,direction](string)
or
string_trim[character](string)
or
string_trim(string)
Friday, January 30, 2015
Get nth character in a String in Linux
This is a very popular Unix question, How to get 3rd char from a 3rd column of a tab delimited file ? We are usually know how to get the nth column by using "CUT" or "AWK" command. But not aware with this "CUT" options which can give the particular column. Lets see how to use this -
Wednesday, January 21, 2015
Tuesday, January 06, 2015
Rescuer 'xxd' command in Linux
"xxd" - a Rescuer , you guys are thinking why I am saying it a Rescuer so this is why so -
In our day to day work in Datastage/Linux, sometimes we have to deal with "Non Printable Character" ( bad characters ;). To confirm these we have many commands but for me this one is more reliable as this is displaying Hexadecimal value for each char from input file.
Every 2 no is representing 1 char from a file, here I have represent a char "a" which hexadecimal value is "61".
In our day to day work in Datastage/Linux, sometimes we have to deal with "Non Printable Character" ( bad characters ;). To confirm these we have many commands but for me this one is more reliable as this is displaying Hexadecimal value for each char from input file.
Every 2 no is representing 1 char from a file, here I have represent a char "a" which hexadecimal value is "61".
Saturday, January 03, 2015
Windows Command Prompt setup for DataStage Command Line
As we know that for using Datastage Command Line in Linux system, we need to setup linux shell session likewise we need to do same for Windows if server is installed on Windows server.
Follow below steps to setup your Datastage command Line ---
Labels:
Administration
,
commands
,
DataStage
,
environment
,
session
,
windows
Friday, November 14, 2014
Linux Shell session setup for DataStage Command Line
To setup Linux Shell for Datastage command line is very important if you are a DataStage Developer and want to work hassle free on DataStage Command Line.
Follow below steps to setup your profile ---
a) First, we will create .dshome file which is containing the path of DS Engine. If you know what it is, good, create a file in root dir with DS Engine path
otherwise execute below scripts to do it by itself
Labels:
Administration
,
commands
,
DataSet
,
DataStage
,
environment
,
Linux
,
orchadmin
,
profile
,
set
Sunday, November 09, 2014
TimeStamp Comparison in Linux
Comparing Date, Time or TimeStamp is tricky thing in Linux. This is how you can achieve this -
By converting date to Seconds
$ date +%s
the above command will current time in seconds since 1970-01-01 00:00:00 UTC
if you have time in string form you can use below command to convert them like -
Tuesday, October 28, 2014
VI Cheat Sheet
Cursor movement
- h - move left
- j - move down
- k - move up
- l - move right
- w - jump by start of words (punctuation considered words)
- W - jump by words (spaces separate words)
- e - jump to end of words (punctuation considered words)
- E - jump to end of words (no punctuation)
- b - jump backward by words (punctuation considered words)
- B - jump backward by words (no punctuation)
- 0 - (zero) start of line
- ^ - first non-blank character of line
- $ - end of line
- G - Go To command (prefix with number - 5G goes to line 5)
Monday, October 13, 2014
\n not creating new line in Linux
When we are using Linux, Some Shell are quite good to understand the Escape characters we want to print but some are not.
This is how we have to make them understood these characters -
$ echo "Atul \n Singh"
Atul \n Singh
Saturday, October 11, 2014
Cut, Copy n Paste in VI editor
We Engineers are well trained in Cut, Copy and Paste things :-) and who the hell don't know the Ctrl-X, C n V. But when we come to same but in Linux Platform we are behaving like dumb ;P. Don't feel offended...I'll help u here
So Lets learn some command which can do the same in Linux VI editor --
Cut - Ctrl-X
The command 'dd' is used for cutting text. Cutting current word, lines or many more summarized below -dd Delete current line D Delete from cursor to end of line
d$ Delete from cursor to end of line
d0 Delete from cursor to beginning of line
dw Delete from cursor to end of current word
db Delete from cursor to beginning of current word
Ndd Delete N no of lines including current line
Thursday, September 25, 2014
File descripters in Unix
A file descriptor is an abstract value of type Unix.file_descr,
containing information necessary to use a file: a pointer to the file,
the access rights, the access modes (read or write), the current position
in the file
or we can say
Under the covers of the Unix operating system, files are referenced, copied, and moved by unique numbers known as file descriptors.
Three descriptors are predefined. They correspond to standard input, standard output, and standard error.
0 - stdin (Standard Input) "<"
1 - stdout ( Standard Output) "1>" or ">"
2 - stderr ( Standard Error) "2>"
or we can say
Under the covers of the Unix operating system, files are referenced, copied, and moved by unique numbers known as file descriptors.
Three descriptors are predefined. They correspond to standard input, standard output, and standard error.
0 - stdin (Standard Input) "<"
1 - stdout ( Standard Output) "1>" or ">"
2 - stderr ( Standard Error) "2>"
Tuesday, September 23, 2014
Show Hidden Character in VI Unix
If you need to show hidden characters such as tab, return carriage, you can use the following command in vi
:set listto show all the hidden characters.
You can also type
:set nolist to turn it off
Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you
https://twitter.com/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098
Tuesday, July 15, 2014
Handling Filename with Spaces in Linux
Spaces in Unix/Linux Filename is not a good habit as usually it is used as delimiter for field values rather than being in filename itself. In Linux, SPACE is used as a IFS ( Internal Field Separator) that is used for word splitting after expansion and to split lines into words with the read build in command. The default values of IFS is SPACE, TAB, NEW LINE.
This is why whenever we are doing something with File-name having spaces in Linux, we got error like..
: No such File or Directory
What if you got some files from a "Unix dumb" Server source, How you will handle the filename with spaces, Here are some simple ways to deal with it.
Saturday, June 21, 2014
Tuesday, June 10, 2014
Interview Questions : Unix/Linux : Part-8
1. Display all the files in current directory sorted by size?
ls -l | grep '^-' | awk '{print $5,$9}' |sort -n|awk '{print $2}'
2. Write a command to search for the file 'map' in the current directory?
find -name map -type f
3. How to display the first 10 characters from each line of a file?
cut -c -10 filename
4. Write a command to remove the first number on all lines that start with "@"?
sed '\,^@, s/[0-9][0-9]*//' < filename
ls -l | grep '^-' | awk '{print $5,$9}' |sort -n|awk '{print $2}'
2. Write a command to search for the file 'map' in the current directory?
find -name map -type f
3. How to display the first 10 characters from each line of a file?
cut -c -10 filename
4. Write a command to remove the first number on all lines that start with "@"?
sed '\,^@, s/[0-9][0-9]*//' < filename
Tuesday, April 08, 2014
Setting up "CRON" Jobs in Nix
If you want to use the emacs editor for editing cron
jobs, then, set the following in
your "/home/user/.bash_profile"
EDITOR=emacs
Then, to edit cron jobs
$ crontab -e
You may want to put in the following header
Thursday, March 27, 2014
Get list of locked item on DataStage Server with Script
This script can be run with or without any argument and provide the list of Job, item locked in DataStage environment by any user. This script will help release the locks if user doesn't locked the item.
Script Name : DSgetJobLocks.sh
Usage : ./DSgetJobLocks.sh [one or more argument]
Subscribe to:
Posts
(
Atom
)
