Hello,
I have a requirement in one of my batch control job to get the value from Hashed file.If the value is present in the hashed file the job should run otherwise(Record Not Found in the hashed file) the job would abort.I have tested the below code in bacth job..but noluck..can you please suggest me any other way to resolve this issue.
HashTableName="FinancialLineHash"
HashTableKey="Y"
YEAR = HashTableLookup (HashTableName,HashTableKey,1)
if IsNULL(YEAR) then (or) if len(YEAR) = 0 then
Call DSLogFatal("HashTableLookup Failed for YEAR: Batch::LoadETLFinLineMonth", "JobControl")
Abort
end
Thanks,
Satheesh
Batch Control Job issue
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Since HashTableLookup() was written locally at your site, it is impossible for us to comment. We have no information about how this routine behaves when the supplied key is not found.
You could, as an alternative, use the SDK routine called UtilityHashLookup, or you could write your own Open and Read statements within the code, or you could even use the Trans() or XLate() function.
You could, as an alternative, use the SDK routine called UtilityHashLookup, or you could write your own Open and Read statements within the code, or you could even use the Trans() or XLate() function.
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.
-
- Participant
- Posts: 182
- Joined: Thu Jun 16, 2005 2:05 am
Hi,
Sorry, i missed to mentioned about the routine functionality.
The routine(HashTableLookup) would return the value when it found in the particular hashed file.
Otherwise it would return **RECORD NOT FOUND**.
If no record found, return value is: "**RECORD NOT FOUND**".
Please suggest me on how to handle this issue in the batch control job.
Thanks,
Satheesh
Sorry, i missed to mentioned about the routine functionality.
The routine(HashTableLookup) would return the value when it found in the particular hashed file.
Otherwise it would return **RECORD NOT FOUND**.
If no record found, return value is: "**RECORD NOT FOUND**".
Please suggest me on how to handle this issue in the batch control job.
Thanks,
Satheesh
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
So whoever "wrote" that routine stole the code from UtilityHashLookup.
Test for that particular value.
The Abort statement is redundant. DSLogFatal() will cause the job to abort.
Test for that particular value.
Code: Select all
If YEAR = "**RECORD NOT FOUND**"
Then
Call DSLogFatal("HashTableLookup Failed for YEAR: Batch::LoadETLFinLineMonth", "JobControl")
End
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.