Saturday, February 28, 2015

How to Parse First Middle ,Mid Names and Last name from a String



         How to Parse First Middle ,Mid Names and Last name from a String 

USE of REG_EXTRACT Function 


SRC IS :- John M Doe IRA
REG_EXTRACT(NAME,'(\W+)\S+(\W+)\S+(W+)\S+(W+)',1)
REG_EXTRACT(NAME,'(\W+)\S+(\W+)\S+(W+)\S+(W+)',2)
REG_EXTRACT(NAME,'(\W+)\S+(\W+)\S+(W+)\S+(W+)',3)
REG_EXTRACT(NAME,'(\W+)\S+(\W+)\S+(W+)\S+(W+)',4)




FNAME:-John 
MNAME:-M 
LNAME:-Doe 
IDEBTIFIER:-IRA

THANKS:-
:)

Wednesday, February 25, 2015

Shortcut keys-in-informatica-powercenter

ASTERISK 1.6 And SYNWAY DRIVER INSTALLATION GUIDE

This topic is very interesting to me because of ,have started my carrier with telecom sector ,that had lot of interesting  stuff and idea with ASTERISK technology..
That time i was keen interested to work asterisk server........after 2 + year i left  due to some of my personnel reason.. Today i am going to share my  first document to you which i wrote Feb-2011.
-------------------------------------------------------------------------------------------------------------------------

ASTERISK 1.6 INSTALLTION:-

Before you do the installation make sure that Linux enterprise edition 4,0 or 5.0 is
installed on your machine. If yes then follow the steps:

• STEP 1: Open terminal and run he following commands . the command will
create the folder where the asterisk setups would be placed.
mkdir -p /usr/src/asterisk
cd /usr/src/asterisk

•STEP 2: Copy the following asterisk setups files in the above mentioned location.
asterisk-1.6.0.10.tar.gz
asterisk-addons-1.6.0.2.tar.gz
dahdi-linux-complete-2.1.0.4+2.1.0.2.tar.gz
dahdi-tools-2.2.0.tar.gz
libpri-1.4.10.1.tar.gz
SynAST-1.3.0.0_en.tar.gz

•STEP 3: On the terminal change the director to the folder where you placed the
setups by running
cd /usr/src/asterisk
then tun the following command to untar the setups
tar -zxf asterisk-1.6.0.10.tar.gz
tar -zxf asterisk-addons-1.6.0.2.tar.gz
tar -zxf dahdi-linux-complete-2.1.0.4+2.1.0.2.tar.gz
tar -zxf dahdi-tools-2.2.0.tar.gz
tar -zxf libpri-1.4.10.1.tar.gz
tar -zxf SynAST-1.3.0.0_en.tar.gz
You'll end up with four tar files and four directories in the directory '/usr/src/asterisk'.

14
• STEP4 : Go ahead with the installations now:
• Libpri (optional)
If you are using E1 cards you need to install LIBPRI. If you do want to use LIBPRI,
make sure you compile and install it before you compile Asterisk. Replace 'VERSION'
with the correct details.
cd /usr/src/asterisk/libpri-VERSION
make clean
make
make install
•DAHDI
cd /usr/src/asterisk/dahdi-linux-complete-VERSION
make all
make install
make config
Edit /etc/dahdi/modules, /etc/dahdi/system.conf and /etc/asterisk/chan_dahdi.conf for
your site.
Set DAHDI to start automatically and then start it.
chkconfig dahdi on
service dahdi start
•Asterisk
cd /usr/src/asterisk/asterisk-VERSION
make clean
./configure

Choose which options to install (audio files, voicemail storage, codecs etc.)

make menuselect
make
make install
Install sample files in /etc/asterisk, install docs/manpages and set to start on boot.
make samples
make progdocs
make config
chkconfig asterisk on
Check Asterisk starts properly:
asterisk -vvvvvvvvvvvvvvvvvvvc

stop now
If not, you've probably not been following these instructions carefully! Assuming it does
start properly, you probably want to start it in the background:
service asterisk start

•Asterisk-addons
cd /usr/src/asterisk/asterisk-addons-VERSION
make clean
./configure
make menuselect
Choose what you do and don't want. Unless you really need oh323, deselect it as it
can be the cause of compilation woes.
make
make install
Install sample files in /etc/asterisk

make samples


SYNWAY DAHDI DRIVER INSTALLATION

First of all ensure that the card is properly fixed in the PCI slot and has been
tighten and its LED should glow. Then check, if its in the OS PCI devices list or not.
Execute the following command for the purpose:
# lspci |grep ob
It will show the card as marked red in the snap shot below :-



With asterisk asterisk-1.6.0.10 dahdi version dahdi-linux-complete-
2.1.0.4+2.1.0.2.tar.gz and synway driver SynAST-1.3.0.0 is used. To proceed with the
installation place the all the setups in the below mentioned directory:

/usr/src/asterisk
To start with the installation first untar the driver file using the below mentioned
commands
[root@localhost ~]# Cd /usr/src/asterisk
[root@localhost ~]# tar –zxvf SynAST-1.3.0.0.tar.gz
it would create a folder named SynAST-1.3.0.0 in the same directory.
Now follow the below mentioned steps to install the driver and have a look on the
snap shot for the better clarity:
[root@localhost ~]# cd /usr/src/asterisk/SynAST-1.3.0.0
[root@localhost SynAST-1.3.0.0]# cd for_dahdi
[root@localhost for_dahdi]# ./Setup install
----------------------------------------------------------
SynAST Ver1.3.0.0 Installation Script
----------------------------------------------------------
Install SynAST AST package now!
You must install libpri and asterisk before this.
Would you like to install SynAST AST package now? (y/n) y
Please enter working dahdi directory [q](exit install) : /usr/src/asterisk/dahdi-linuxcomplete-
2.1.0.4+2.1.0.2
SELECT TEJ MODE [t, e, j] : e
SELECT TEJXAPCI [75, 120]ohm : 120
SELECT TEJ201E [75, 120]ohm : 120
----------------------------------------------------------
Start to compile driver now......


If the driver installation executed in the manner as mentioned above then your driver
has been installed and you can check it with the following command:
# lsmod |grep dahdi
It will result in the following output:



AS confidential
SS-2 Syndriver check snap shot
Now you have to do the PRI configuration:
To generate the default configuration you can run the following command:
[root@localhost for_dahdi]# ./ astcfg_dahdi
it will generate the following configuration files with the default settings:
/etc/dahdi/system.conf
/etc/asterisk/chan_dahdi.conf
For our ISDN setup the files configuration should be as mentioned below:
/etc/dahdi/system.conf:


#*****************SynAST Ver1.3.0.0*****************
loadzone=us
14
miVAS confidential
defaultzone=us
span=1,1,0,ccs,hdb3
bchan=1-15,17-31
dchan=16
span=2,2,0,ccs,hdb3
bchan=32-46,48-62
dchan=47
span=3,3,0,ccs,hdb3
bchan=63-77,79-93
dchan=78
span=4,4,0,ccs,hdb3
bchan=94-108,110-124
dchan=109


/etc/asterisk/chan_dahdi.conf:

miVAS confidential
SS-4 chan_dahdi.conf
Keep backup of the files which are with the default settings in the corresponding
directory and then place the new files with the same names , having the above
mentioned configurations.
Now check with the following command for the spawned channels :
Dahdi_cfg –vv
It will show120 channels to configure.
Now can go ahead with the call testing on differect PRIs. Follow the below mentioned
procedure to carryout the testing:
Restart Asterisk to ensure that the drivers and te others configuration have been
loaded and ready to work. in case of any wrong configuration asterisk would
not start.
Stop asterisk first with the command:
CLI> stop now
then restart it by :
#asterisk -vccc
Nudge all PRIs in the slots on the Synway card and check for the Leds. All
should glow, as soon as you plug the PRI.
then make a file named test. call to make the test call: it should be as pasted
below:
Channel: DAHDI/111/09557456660
Callerid: 9557456660
MaxRetries: 1
RetryTime: 300
WaitTime: 45
Context: text
Extension: 30565900
Priority: 1

 
Put the number in the test.call on which you want to take the test call ,save the
file and paste in the following directory
/var/spool/asterisk/outgoing
Asterisk will pick the file , call on your number and play he demo application.
Repeat the process for the all the PRIs, by charging the channel numer in the
test.call.
Channel: DAHDI/111/09557456660
Here 111 is the channel number and thus its nexus is with the fourth PRI.


THANKS ...



Tuesday, February 24, 2015

Getting Count For Duplicate Values And Distinct Value

Getting Count For Duplicate Values And Distinct Value?

STEP 1:-
create table t1(t1 VARCHAR2(5),C2 VARCHAR2(5),C3 VARCHAR2(5));
create table t2(t1 VARCHAR2(5),C2 VARCHAR2(5),C3 VARCHAR2(5),C4 VARCHAR2(10));

INSERT INTO t1 values('a','b','c'); 
INSERT INTO t1 values('a','b','c'); 
INSERT INTO t1 values('x','y','z'); 
INSERT INTO t1 values('x','y','z'); 
INSERT INTO t1 values('a','s','d'); 
INSERT INTO t1 values('z','x','c'); 
INSERT INTO t1 values('v','b','n'); 
INSERT INTO t1 values('v','b','n'); 
INSERT INTO t1 values('q','w','e'); 
INSERT INTO t1 values('x','c','v'); 
COMMIT;


STEP:2 








Monday, February 16, 2015

Assigning a Batch Number Using Sequence Generator

Assigning a Batch Number Using Sequence Generator

In my case  i have scenario ..

batch_num column assign a values group of 1000 

In case  i used a sq transformation  and mod function in Informatica  expression transformation.




Or We can do it from different ways....:)




 BEST PYSPARK LEARNING SITES https://www.youtube.com/watch?v=s3B8HXLlLTM&list=PL2IsFZBGM_IHCl9zhRVC1EXTomkEp_1zm&index=5 https://www...