Difference between CLEAR.FILE and CLEAR-FILE

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
mbreion
Premium Member
Premium Member
Posts: 6
Joined: Mon Jun 21, 2010 2:28 am

Difference between CLEAR.FILE and CLEAR-FILE

Post by mbreion »

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 ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Ancient History lesson

Post by ray.wurlod »

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.
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 »

Ah... it's been a little while but I likes me the Full Wurlod. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
mbreion
Premium Member
Premium Member
Posts: 6
Joined: Mon Jun 21, 2010 2:28 am

Post by mbreion »

Thank you for replies.
In short, there is no difference between CLEAR.FILE and CLEAR-FILE except that you won't find the latter in the VOC file.
A guy told me the same explanation.


@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
No checking of return codes !
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Perhaps you should add that so that you might have some idea if there is a problem, what the problem might be. Don't have the syntax for that off the top of my head, perhaps someone else can help...
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I would imagine it's an all-or-nothing proposition. Any chance you are clearing the logs of running jobs?
-craig

"You can never have too many knives" -- Logan Nine Fingers
mbreion
Premium Member
Premium Member
Posts: 6
Joined: Mon Jun 21, 2010 2:28 am

Post by mbreion »

We checked the routine not running at same time normals jobs.
We opened PMR to IBM, partially about suspicion of changes of hash files in v8. We'll use opportunity to talk about this. Wait...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Hashed files are not changed in version 8.5. (They carry the same internal version number as in 8.1, which tells us that they are unchanged.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mbreion
Premium Member
Premium Member
Posts: 6
Joined: Mon Jun 21, 2010 2:28 am

Post by mbreion »

We use IS 8.1.0.2.
We have a decrease in performance of hash files writings, in compared to 7.5.3.
Post Reply