I-descriptor was not compiled

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

cnguyen
Premium Member
Premium Member
Posts: 31
Joined: Fri May 14, 2004 9:27 am

I-descriptor was not compiled

Post by cnguyen »

I would like to get a list of log entries for a job which were generated after a point in time. I am using a UNIVERSE stage with the below SQL.

SELECT @ID, "TYPE", TIMESTAMP, EVAL "FULL.TEXT[1,8]", EVAL "@RECORD<7>" FROM UNNEST RT_LOG2547 ON FULL.TEXT WHERE @ID >= 0 AND TIMESTAMP >= '2007-02-05 07:03:30' AND ((FULL.TEXT LIKE "Starting Job%" or FULL.TEXT LIKE "Finished Job%" or FULL.TEXT like "Job%aborted.") and TYPE=5) or (FULL.TEXT like "%Stopped" and TYPE=1) ORDER BY @ID

The job runs fine for projects with small number of jobs but on one project where there are 1700+ jobs, it failed intermittently with the following errors.

The main objective is to find all "start" and "finish" entries so we can calculate actual runtime of the job.

Any idea on the error as well as possible solution is greatly appreciated.

Thanks

SQLSTATE=S1000, DBMS.CODE=40030
[DataStage][SQL Client][UNIVERSE]I-descriptor "@RECORD<7>" was not compiled.

DataStage Job 2768 Phantom 20765
@RECORD < 7 >
Job Aborted after Fatal Error logged.
Attempting to Cleanup after ABORT raised in stage mdsGetJobElapsedTime.1.findFinishes
DataStage Phantom Aborting with @ABORT.CODE = 1
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I have seen this before. I think you need to learn to create dictionary items and not use EVAL. It is less stable.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does this occur reliably or occasionally? Is there a pattern - for example does it occur for some values of job number in RT_LOGnnnn and not for other values?

Why are you using UNNEST (normalizing on FULL.TEXT)? I don't think it's necessary for selecting.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
cnguyen
Premium Member
Premium Member
Posts: 31
Joined: Fri May 14, 2004 9:27 am

Post by cnguyen »

Thanks for the quick response. The job is scheduled to run at 6:00 everyday on all DataStage servers. It usually fails on Sunday morning and on large (500+ jobs) projects. I have not been able to establish a pattern and will continue to track this.

As far as using the UNNEST to normalize FULL.TEXT, we used the code from a sample job and did not know that was not neccessary. I will try without it.

Thanks
cnguyen
Premium Member
Premium Member
Posts: 31
Joined: Fri May 14, 2004 9:27 am

Post by cnguyen »

kduke wrote:I have seen this before. I think you need to learn to create dictionary items and not use EVAL. It is less stable.
Kim,

I only want to bring back the first 8 characters of FULL.TXT so the EVAL "FULL.TEXT[1,8]" entry. Also, I need to find the invocation id and hence the EVAL "@RECORD<7>" entry. Don't know of another way to do this beside the EVALs. I appreciate any suggestions that you can provide.

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You could try using F7 instead of the EVAL statement to get field 7. I'm not at a client now to check, but am fairly certain that F1-F9 are declared for use as positional columns.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That only works in RetrieVe, not in DataStage SQL. What Arnd is referring to is that VOC contains D-type field descriptors F1 through F9, that can be used to refer to any field (from 1 to 9) in a record. You could certainly do this by specifying RT_LOGnnnn USING DICT VOC in your FROM clause; however, you could not then get at FULL.TEXT which is in DICT RT_LOG rather than in DICT VOC.

You could add a descriptor for field #7 to the log dictionary.

Code: Select all

INSERT INTO DICT RT_LOG(ID, CODE, LOC, NAME, FORMAT, SM) VALUES ('INV_ID', 'D', 7, 'Inv ID', '6R', 'S');


Now your query, with no EVALs, looks like this:

Code: Select all

SELECT @ID FMT '5R' COL.HDG 'Event', "TYPE", TIMESTAMP, SUBSTRING(FULL.TEXT FROM 1 FOR 8) FMT '8L' COL.HDG 'FullText', INV_ID FROM RT_LOG2547 WHERE CAST(@ID AS VARCHAR) NOT LIKE '//%' AND TIMESTAMP >= '2005-02-07 00:00:01' AND ((FULL.TEXT LIKE 'Starting Job%' OR FULL.TEXT LIKE 'Finished Job%' OR FULL.TEXT LIKE 'Job%aborted.') AND "TYPE" = 5) OR (FULL.TEXT LIKE '%Stopped%' AND "TYPE" = 1) ORDER BY @ID;
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ray - thanks for pointing that out; I didn't realize that the SQL syntax was being used.
cnguyen
Premium Member
Premium Member
Posts: 31
Joined: Fri May 14, 2004 9:27 am

Post by cnguyen »

We found out that "INVOCATION.ID" is one of the fields that we can use in the SQL. Also decided to bring the FULL.TEXT and not portion of it back. The new SQL now looks like.

Code: Select all

SELECT @ID, "TYPE", TIMESTAMP, "FULL.TEXT", "INVOCATION.ID" FROM #rtLogFile# WHERE @ID >= 0 AND TIMESTAMP >= '#CollectionTime#' AND ((FULL.TEXT LIKE "Starting Job%" or FULL.TEXT LIKE "Finished Job%" or FULL.TEXT like "Job%aborted.") and TYPE=5) or (FULL.TEXT like "%Stopped" and TYPE=1) ORDER BY @ID;
EVAL is not used any more. We have redeployed this change and will continue to monitor to see if the problem will reoccur. Many thanks to you all.

Ray, in your post you have the following code

Code: Select all

WHERE CAST(@ID AS VARCHAR) NOT LIKE '//%'
Can you let me know what is the effect of this condition?

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There are up to 3 log file entries that are used to hold internal data (including the purge settings) and that have different metadata than the other records. Since you don't want (or need) them, Ray added the filter to remove them. These records begin with "//"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Luckily for you, the ASCII code for "/" is 47 and the ASCII code for "0" is 48, so that your filter (WHERE @ID >= 0) will also exclude the control records.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
cnguyen
Premium Member
Premium Member
Posts: 31
Joined: Fri May 14, 2004 9:27 am

Post by cnguyen »

Thanks for saving me some work. Just getting ready to add the filter below and found your latest reply. Ran the new code multiple times today against the largest project and the error has not occured. Will continue to monitor the jobs for a few more days.

Code: Select all

WHERE CAST(@ID AS VARCHAR) NOT LIKE '//%'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The error won't occur. Because you have no EVAL expressions in your SQL, there are no I-descriptor expressions (which are introduced by EVAL) to compile.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
cnguyen
Premium Member
Premium Member
Posts: 31
Joined: Fri May 14, 2004 9:27 am

Post by cnguyen »

This issue has been resolved. The change to remove EVALs works. Many thanks to all for your help :D
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Ray I thought the slashes were backslashes?
Mamu Kim
Post Reply