Need a Help on Remove some data in Hash file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Need a Help on Remove some data in Hash file

Post by dr.murthy »

Hi ,

am working on Datstage 7.5 server jobs, my requirement is need to remove some records (let say storenum = 123) in a 30 hashfiles.
i design a job like

Code: Select all

hash-->Trn-->Seq--->Trns--->Hash
the first transformer have some filter condition to remove storenum and then write into a seq file and then write into the same hash file. but it takes more time to design a job for 30 hash fiels.
can you just tel me any other way to implement this change??

Thanks in Advance
D.N .MURTHY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If the hashed files are in an account (or otherwise have a VOC record) you could use the UV stage and SQL to delete records from them.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Use ODBC or Universe stage to do SQL delete
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

How can i use Universe or ODBC to delete records in hash fiels.
D.N .MURTHY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Seems like my post is invisible. [scratches head]

'SQL delete' means exactly what it sounds like it means, you would use sql to delete the records just like you would from a relational table.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

is it possible to read hash file data through UV stage in datastage canvas?
D.N .MURTHY
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, provided that a VOC pointer exists to the hashed file.

Note - it's hashed file, not hash file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Still invisible. [sigh]
-craig

"You can never have too many knives" -- Logan Nine Fingers
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

Am really sorry i never worked with hashed file bu i have few knowledge and am not sure where to write SQL in Hashed stage
D.N .MURTHY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't, you write it in the UV stage. As noted. And searching the forums for SETFILE which should help with the VOC issue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

Yes i got that but i have an issue when i view the data i got a error message like Datastage/SQl : Syntax Error . unexpected symbol. can you help me to resolve this [/code]
D.N .MURTHY
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

I think you may need to post more information on what you did, where you did, full error message etc....etc....etc...
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

i set the properties as Datasourcename as localuv and the tablename i specifie the hash file name , when i view the data i got this error message
DSBrowser..UniVerse_0.DSLink2: DSD.BCIOpenR call to SQLExecDirect failed.
Statement was:SELECT AcctIDHash.BANK_NUMBER, AcctIDHash.APPL_CODE, AcctIDHash.ACCOUNT_NUMBER, AcctIDHash.SUB_ACCOUNT_NUMBER, AcctIDHash.CLOSED_DATE, AcctIDHash.ACCT_ID, AcctIDHash.OPEN_DATE, AcctIDHash.OPEN_CLOSED_IND, AcctIDHash.ACCOUNT_BRANCH_ID, AcctIDHash.PROD_SRVC_RANK, AcctIDHash.ACCOUNT_RET_CML_IND FROM "AcctIDHash"
SQLSTATE=S1000, DBMS.CODE=950088
[DataStage][SQL Client][UNIVERSE]DataStage/SQL: syntax error. Unexpected symbol. Token was "AcctIDHash.BANK_NUMBER". Scanned command was FROM "AcctIDHash" SELECT AcctIDHash.BANK_NUMBER
D.N .MURTHY
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

My datastag mission installed in Windows server
D.N .MURTHY
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Whether UNIX or Windows, the uvsh executable is in the same relative location.
Post Reply