Difference between CLEAR.FILE and CLEAR-FILE
Moderators: chulett, rschirm, roy
Difference between CLEAR.FILE and CLEAR-FILE
Here all projects use a routine to clear RT_STATUS and RT_LOG.
I have two questions :
1) After CLEAR.FILE of RT_STATUS, some RT_STATUS aren't cleared. How it's possible ?
2) In the routine I found the command CLEAR-FILE (note the '-') to clear RT_LOG. What the difference with CLEAR.FILE ?
I have two questions :
1) After CLEAR.FILE of RT_STATUS, some RT_STATUS aren't cleared. How it's possible ?
2) In the routine I found the command CLEAR-FILE (note the '-') to clear RT_LOG. What the difference with CLEAR.FILE ?
It might help to post the routine code.
1. You are clearing specific logs, yes? I.E. RT_STATUSnnn where nnn is the internal job number. Are you checking the return code from it?
2. Never heard of the one with the dash, just the dot. Could be some kind of synonym, I guess... does it work when you use it?
1. You are clearing specific logs, yes? I.E. RT_STATUSnnn where nnn is the internal job number. Are you checking the return code from it?
2. Never heard of the one with the dash, just the dot. Could be some kind of synonym, I guess... does it work when you use it?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ancient History lesson
Once upon a time there was a multi-value database called GIRLS. Later other vendors jumped on the bandwagon but had different ideas about identifiers. One group (let's call them the Pick group) preferred the hyphen as a delimiter while others (let's call them the Prime INFORMATION group) preferred the dot.
UniVerse began its life with a strong strategy of poaching accounts from both groups, and so had to handle both. DataStage was originally built on UniVerse so follows the UniVerse strategy.
The "verb" of the command is sought in the VOC as given. If it is not given, hyphens are changed to dots and that command is sought. If that is not found, the command is changed to upper case and that verb is sought. Only if all three fail does "command not found" error message get generated.
In short, there is no difference between CLEAR.FILE and CLEAR-FILE except that you won't find the latter in the VOC file.
You might find Dawn Wolthuis's review of multi-value databases interesting.
UniVerse began its life with a strong strategy of poaching accounts from both groups, and so had to handle both. DataStage was originally built on UniVerse so follows the UniVerse strategy.
The "verb" of the command is sought in the VOC as given. If it is not given, hyphens are changed to dots and that command is sought. If that is not found, the command is changed to upper case and that verb is sought. Only if all three fail does "command not found" error message get generated.
In short, there is no difference between CLEAR.FILE and CLEAR-FILE except that you won't find the latter in the VOC file.
You might find Dawn Wolthuis's review of multi-value databases interesting.
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.
Thank you for replies.
@chulett
No checking of return codes !
A guy told me the same explanation.In short, there is no difference between CLEAR.FILE and CLEAR-FILE except that you won't find the latter in the VOC file.
@chulett
Code: Select all
* vIdInternal = internal job number
FileName="RT_LOG":vIdInternal
...
Execute "CLEAR-FILE ":FileName Capturing dummy
...
Execute "CLEAR.FILE ":DSR.RTSTATUS.FNAME:vIdInternal
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
CLEAR.FILE (or CLEAR-FILE) always clears all records. Basically it overwrites the file with /dev/null then replaces the empty header. So can you suggest which records are not being cleared?
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: