I have searched the forum for deleting Hash Files. I got the command as
delete.file HashFileName.
But I need to develop a Before/After Job routine for the same. Can any one help me in this regard, as I am getting a message as Variable Delete undefined
Delete Hash File via Routine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 132
- Joined: Wed Mar 01, 2006 11:12 pm
- Location: Pune
Re: Delete Hash File via Routine
hello for writing custom routine you need to check for paticular directory and hash file to delete, i mean to say their should be two input parameter.
next is basic code help text.
Use the EXECUTE statement to execute DataStage commands from within the
BASIC program and then return execution to the statement following the
EXECUTE statement.
below are few points that will help you
1.$INCLUDE UNIVERSE.INCLUDE OSDEF.H (need to include in your script).
2. SEP='\'
DEL=SYSTEM(32):SEP:"bin":SEP:"rm "
DELR = SYSTEM(32):SEP:"bin":SEP:"rm -r "
SHELL="DOS /C "
3.cmd = DELR:" ":filepath:SEP:"D_":filename
cmd = SHELL:'"':cmd:'"'
4.execute cmd capturing result1 returning error1
check for basic code help for Execute command.
next is basic code help text.
Use the EXECUTE statement to execute DataStage commands from within the
BASIC program and then return execution to the statement following the
EXECUTE statement.
below are few points that will help you
1.$INCLUDE UNIVERSE.INCLUDE OSDEF.H (need to include in your script).
2. SEP='\'
DEL=SYSTEM(32):SEP:"bin":SEP:"rm "
DELR = SYSTEM(32):SEP:"bin":SEP:"rm -r "
SHELL="DOS /C "
3.cmd = DELR:" ":filepath:SEP:"D_":filename
cmd = SHELL:'"':cmd:'"'
4.execute cmd capturing result1 returning error1
check for basic code help for Execute command.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are three different ways to delete a hashed file (note, not hash file): which one you should choose depends upon how the hashed file was created.
Once you've sorted that out, you would invoke the appropriate command through a call to the DSExecute subroutine.
Once you've sorted that out, you would invoke the appropriate command through a call to the DSExecute subroutine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.