DS_AUDIT

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

Post Reply
saikir
Participant
Posts: 92
Joined: Wed Nov 08, 2006 12:25 am
Location: Minneapolis
Contact:

DS_AUDIT

Post by saikir »

Hi All,

I am trying to capture the audit information of jobs using the DS_AUDIT table. But when i try to query the DS_AUDIT table, i get the following error:

Command failed to execute - DataStage/SQL: syntax error. Unexpected symbol. Token was "CLASSID". Scanned command was FROM DS_AUDIT SELECT @ID , CLASSID.

My Command:

SELECT @ID,CLASSID, DTC,CREATOR,PREVDTD,PREVDELETOR,DTM,MODIFIER,REASON,FIELD(KEY, "\", 2, 99),FIELD(KEY, "\", 1) FROM DS_AUDIT WHERE CLASS=2;

Regards,
Sai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

LIST.DICT DS_AUDIT
will reveal the correct column names that you may use in a query. They are case sensitive. You can use only the ones whose type is "D" or "I" in a query.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
saikir
Participant
Posts: 92
Joined: Wed Nov 08, 2006 12:25 am
Location: Minneapolis
Contact:

Post by saikir »

Hi Ray,

Thanks for the inputs. Was able to retrive data from DS_AUDIT table using the following query:

SELECT DS_AUDIT.@ID, DS_AUDIT.KEY , DS_AUDIT.DTC , DS_AUDIT.CREATOR , DS_AUDIT.PREVDTD, DS_AUDIT.PREVDELETOR , DS_AUDIT.DTM, DS_AUDIT.MODIFIER , DS_AUDIT.REASON, DS_AUDIT.INSTANCE , DS_AUDIT.CLASS FROM DS_AUDIT;

Sai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In short, CLASS not CLASSID.

Tip: _ Where the error message occurred, the query parser has indicated the token at which it had stopped, in this case CLASSID. And it's reported that that is an unexpected symbol. So you go back to the metadata to determine the correct name of the symbol, which you did.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply