0% found this document useful (0 votes)
110 views

DS Dev

The document describes various commands used in Linux and Datastage: 1) It provides commands to change directories, run environment variables, find number of records in a file, and run Orchadmin commands in Linux. 2) It also describes SQL commands to check tables and databases in Teradata, check scratch space size, and check CPU details. 3) Finally, it lists techniques to read multiple tables and files in Datastage like using multiple instances, RCP, and parameterized queries.

Uploaded by

mysharma888
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

DS Dev

The document describes various commands used in Linux and Datastage: 1) It provides commands to change directories, run environment variables, find number of records in a file, and run Orchadmin commands in Linux. 2) It also describes SQL commands to check tables and databases in Teradata, check scratch space size, and check CPU details. 3) Finally, it lists techniques to read multiple tables and files in Datastage like using multiple instances, RCP, and parameterized queries.

Uploaded by

mysharma888
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

============

To change to DSHome directory:


muvtqa@eccas1841:/ford/proj/IBM/Projects/MUVT_QA/interimfiles $ cd `cat /.dshome
`
To Run dsenv variable:
muvtqa@eccas1841:/ford/.p_dstage/dstage/IBM/InformationServer/Server/DSEngine $
. ./dsenv
To find no. of E01.ds records
muvtqa@eccas1841:/ford/.p_dstage/dstage/IBM/InformationServer/Server/DSEngine $
dsrecords -n /ford/proj/IBM/Projects/MUVT_QA/interimfiles/E01.ds
2025541
To run Orchadmin cmd:
muvtqa@eccas1841:/ford/.p_dstage/dstage/IBM/InformationServer/Server/DSEngine $
orchadmin rm /ford/proj/IBM/Projects/MUVT_QA/interimfiles/E01.ds
##E IIS-DSEE-TFCF-00005 Could not open config file /ford/proj/IBM/InformationSer
ver/Server/Configurations/default.apt: Permission denied.
##F IIS-DSEE-TFCF-00009 Fatal Error: Cannot continue without a configuration fil
e.
============
character_length()
- count characters in Teradata
Char2HexInt()
- Return HexaIntegar value of data e.g. 4B41202020202020
202020202020202020202020 for KA value.
============
To check table and database in Teradata
SELECT tablename, databasename FROM dbc.tables WHERE databasename LIKE '%EMREP%'
;
============
To check the scratch space size
ysharma5@fcas1820:/ford/proj/IBM/Projects/MUVT_DEV/scratch $ df -h | grep 'muvt'
TotalSpace UsedSpace LeftSpace Used%
10G 175M 9.9G 2% /ford/.p_muvt_proj/muvt
============
Integration testing AKA SIT(System Integration Testing)
============
To check CPU details in Linux:
lscpu
============
char 4 - can store 4 alphabet
decimal 5,2 - can store total DIGIT 5 wtih precision 2.
varchar 2 - can store 2 alpha or numeric but UNBOUNDED varchar can store any len
gth.
integar
Numeric 4 can store upto 9999, 3 upto 999, 2 upto 99. Tested by me.
date ?????????????????????
============

Auto conversion:
char to integar
char to decimal
char to date
Time to Timestamp
:%nn:%ss.6")

StringToDate
StringToTimestamp(myTimestamp,"%yyyy-%mm-%dd %hh

============
If DSjob is not getting compiled, and the error is:
The open files limit is 1024; raising to 8192.
The virtual memory limit is 41345925120 bytes. Raising to 18446744073709551615.
Cause: SetNull() in Nullable No column
Sol: Set the column to Nullable Yes
============
While use any of Transformer funcition and get error - "Unexpected error, quitti
ng"
Cause: 8.5 Installation issue
Sol:1.) Go to C:\IBM\InformationServer\Clients\Classic (path varies depending on
how/where you installed DS 8.5)
2.) Find the file vmdsflt.exe
3.) Right click on the above file (vmdsflt.exe) and run it as admin
6430-350
============
How to create 3 digit random numbers?
column generator stage
============
If Target datatype is Image with Not Null property.
Set array size (Column Width) to 1
============
INSERT statement conflicted with the FOREIGN KEY constraint "SESBC15_SESBC07_F2"
. The conflict occurred in database "gesb2contracts", table "dbo.SESBC07_TRANSAC
TION", column 'ESBC07_TRANSACTION_SEQ_D'.
Sol: Need to lookup with "ESBC07_TRANSACTION_SEQ_D" column too
============
If output column is Date type, we can not assign "" into it
as "" means string and Datastage does not involve auto String to Date conversion
.
============
UNIX:
TO merge line in Unix - vi
esc+J
TO merge 5 line in Unix - vi
esc+5J
============

UNIX:
To remove the file older than 100 days:
ls -ltr | find . -type f(-atime +100 \)-exec rm{}\................
============
UTF-8 (U from Universal Coded Character Set + Transformation Format 8-bit)
is a character encoding
capable of encoding all possible characters data.
============
I am trying to read a complex SQL in teradata connector stage, SQL has like arou
nd 80 column & multiple joins. When i run the query on SQL teradata assistant it
runs fine ... but when m trying to run same query in Datastage v9.1 ,,, it give
s me below error.
"RDBMS code 3807 : Object <name> does not exist:
The table exist in DB & also the uid/pwd m using are correct.
Has anyone faced this issue? & know the solution to this?"
Sol: Query had some case statements w/o alias name to it , i removed those & ra
n query it ran fine.
============
I am simply reading a table using SQL(Join data from 2 tables) in Teradata Conne
ctor and writing to dataset. However UNABLE TO VIEW data into dataset and showin
g error as:
Error execting View Data command: E IIS-DSEE-TOPK-000007 06:16:56 (012) <_PEEK_I
DENT_> Input dataset does not have field: R99_VIN
Sol: SQL in Teradata Connector does not have aliases. Use aliases.
============
CASE - WHEN THEN - ELSE END
select
(CASE
WHEN TRANS_TYPE_C = '01'THEN 'Registration'
WHEN TRANS_TYPE_C = '02'THEN 'Cancellation'
WHEN TRANS_TYPE_C = '03'THEN 'Transfer'
WHEN TRANS_TYPE_C = '04'THEN 'Reinstatement'
WHEN TRANS_TYPE_C = '05'THEN 'Contract Correction'
WHEN TRANS_TYPE_C = '06'THEN 'Up-downgrade'
WHEN TRANS_TYPE_C = '07'THEN 'Contract Extension'
WHEN TRANS_TYPE_C = '08'THEN 'Financial Fee Adjustmen
t'
WHEN TRANS_TYPE_C = '09'THEN

'Non Financial Transacti

WHEN TRANS_TYPE_C = '99'THEN

'Non Financial Transacti

on'
on'
ELSE 'Default'
END) as TRANSACTION_TYP, ESPCNTRT_VIN1_15_R
from SWDBA09.SESPB01_CNTRCT_ACT
where COUNTRY_CODE = '092'
============
CASE - WHEN THEN - ELSE END in Inline query
select TRANSACTION_TYP, count(ESPCNTRT_VIN1_15_R) as B01_Contract_Count, max(2)
as dummy
from (
select

(CASE
WHEN TRANS_TYPE_C = '01'THEN 'Registration'
WHEN TRANS_TYPE_C = '02'THEN 'Cancellation'
WHEN TRANS_TYPE_C = '03'THEN 'Transfer'
WHEN TRANS_TYPE_C = '04'THEN 'Reinstatement'
WHEN TRANS_TYPE_C = '05'THEN 'Contract Correction'
WHEN TRANS_TYPE_C = '06'THEN 'Up-downgrade'
WHEN TRANS_TYPE_C = '07'THEN 'Contract Extension'
WHEN TRANS_TYPE_C = '08'THEN 'Financial Fee Adjustmen
t'
WHEN TRANS_TYPE_C = '09'THEN

'Non Financial Transacti

WHEN TRANS_TYPE_C = '99'THEN

'Non Financial Transacti

on'
on'
ELSE 'Default'
END) as TRANSACTION_TYP, ESPCNTRT_VIN1_15_R
from SWDBA09.SESPB01_CNTRCT_ACT
where COUNTRY_CODE = '092') A ------------------- If A remove Query will not ex
ecute, WHY?
group by TRANSACTION_TYP
============
Nested Condition...............
============
ysharma5@fcas1820:~ $ id -Gn
ysharma5 dstage compiler gesbdev
Or
ysharma5@fcas1820:~ $ id -Gn ysharma5
ysharma5 compiler dstage gesbdev
Or
ysharma5@fcas1820:~ $ groups
ysharma5 dstage compiler gesbdev
Or
ysharma5@fcas1820:~ $ groups ysharma5
ysharma5 : ysharma5 compiler dstage gesbdev
users command is fetching the users who are having same group access as our ID's
============
Users that have access to datastage on this server
grep 'dstage' /etc/group
============
Source select statement to get 1 and current timestamp using DB2:
SELECT CAST(1 AS CHAR(1)) AS lookupcol,
CURRENT_TIMESTAMP AS #Generic_tgt_ColPrefix#_UPDT_Y
============
To read multiple TABLE using
-Use Multiple Instance
-Use RCP
-Use Parameterized query for Metadata
============

To read multiple file using


-Use Multiple Instance
-Use RCP
-Use "Column import - Schema file option" for Metadata
============
login DS server
bteq
.logon tera10.dearborn.ford.com/EMREPBPD
PWD

============

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy