Invalid Event Type when using DSGetLinkInfo/DSLogInfo

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
Richard615
Participant
Posts: 12
Joined: Tue Mar 27, 2007 11:08 am

Invalid Event Type when using DSGetLinkInfo/DSLogInfo

Post by Richard615 »

Hi;

In a server job I'm trying to simply grab a link row count, and write that to the log file. I have an AfterJob routine, which contains the following:

$INCLUDE DSINCLUDE JOBCONTROL.H
$INCLUDE DSINCLUDE DSJ_XFUNCS.H
ErrorCode = 0

OUTPUT = DSGetLinkInfo(DSJ.ME,"tran1","outlink",DSLinkRowCount)
Call DSLogInfo(OUTPUT, JobName)

When I run this, I wind up with an error code of -5 in my log, which according to the dsapi.h file is an "Invalid EventType value".

A search of the forum shows many posts that reference the EventType, but none that I saw which actually explain what the EventType is actually doing (and the DS help file didn't seem to help either).

Can someone please explain why I'm getting this error, and what in my snippet of code (which I cobbled together from some other posts regarding DSGetLinkInfo) might be causing the the problem? My forehead is starting to get sore from banging it against the keyboard.

Thanks,

-> Richard
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The InfoType is quite clearly noted in the online help, check the entry for DSGetLinkInfo.

(edited to correct EventType to InfoType)
-craig

"You can never have too many knives" -- Logan Nine Fingers
Richard615
Participant
Posts: 12
Joined: Tue Mar 27, 2007 11:08 am

Post by Richard615 »

Ah, yes, I see I had a typo in my InfoType field. Thanks - it now works as expected.

OUTPUT = DSGetLinkInfo(DSJ.ME,"tran1","outlink",DSJ.LINKROWCOUNT)

This is probably a boneheaded question, but are EventType and InfoType really that synonymous? I completely agree I should have made the connection in this small example, but if there was a larger chunk of existing code where I received an EventType error, I guess I wouldn't immediately think to start looking for InfoType fields. Though perhaps I should - I admit I'm fairly new to using the DS calls, and the related data types.

Thanks again.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, they're not synonymous. EventType would have come from one of the 'Log' related functions. In the online help, use the Search tab and you'll see all of the functions that could have come from.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply