Installing GenHTML -- trouble with JobReport routine

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
bpsprecher
Premium Member
Premium Member
Posts: 21
Joined: Mon Mar 08, 2004 11:42 am

Installing GenHTML -- trouble with JobReport routine

Post by bpsprecher »

I have stumbled upon Kim Duke's Tips & Tricks from recommendations on this website (wow -- thanks Kim). The QA's are excited about automating the report generation at the category level. A few problems, though.

It's narrowed down to the JobReport routine by Tony Curcio. Even attempts to run this routine stand-alone yields a result of "<<ERROR>>". Details from a couple tests:

TEST #1
*******
Arg1 = Lookup_Record_Type_030_C (even tried with *)
Arg2 = /data/Documentation/20070913/Jobs/Category1
Arg3 = /Documentation/OurLogo.jpg
Arg4 = 1
Arg5 = English
Test failed.
Subroutine "DSU.JobReport" called with 6 arguments, 0 were expected"
Program "TSTJobReport.B": Line 3, Unable to load subroutine.


Well, having enough skills (and being somewhat of a smart aleck) to realize it's expecting 0 arguments, I tried calling it without any:

TEST #2
*******
Arg1 =
Arg2 =
Arg3 =
Arg4 =
Arg5 =
Test failed.
Subroutine "DSU.JobReport" called with 6 arguments, 0 were expected"
Program "TSTJobReport.B": Line 3, Unable to load subroutine.


Without source code it's tough to debug. The OutputDirectory & LogoPath both reside on the AIX DS server. Does anyone know how this works beneath the covers? Is it expecting Windows paths for one or both arguments, etc.?

Bonus question: Why does it say it's called with 6 arguments, when the routine has 5 (it even lists 5), but it's expecting 0?

Thank you!
Brian
Brian Sprecher
IBM
Lenexa, KS
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The first argument is the return value. Then there are five input arguments. Total = six.

Can't load subroutine errors usually result from their not having been compiled and cataloged. Use the multi-compile tool to compile all the routines in the project. Or at least all the ones in the "Kim" categories.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bpsprecher
Premium Member
Premium Member
Posts: 21
Joined: Mon Mar 08, 2004 11:42 am

Post by bpsprecher »

Thanks Ray -- tried it -- identical results. Nuts.

I tried "Multiple Job Compile" on JobReport alone, tested, then MJC on all the Kim routines, tested, then MJC on all the routines in the project, & tested once again. Then, I re-downloaded the DSX from Kim Duke's website, re-imported, and tried it all again.

In reference to your Dilbert quote: There's no big hurry; I'm deriving plenty of amusement from witnessing the QA's salivate. Any preference on how to be compensated for the bonus question?

Additional bonus question: How does a routine compile without source code?
Brian Sprecher
IBM
Lenexa, KS
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The bonus question should be added to one or more of the DataStage Interview Question web sites.
:lol:

I should love to hear how you replied (provided it's clean, of course).

Check the source code for DSJobReport and verify that it has five input arguments.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Tony never posted source. It is in a separate dsx file DSJobReport.dsx. You need to import it.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Curious. So this is not the DSJobReport routine (in Built-In\Before/After category) that ships with DataStage (obviously, since a before/after subroutine has precisely two arguments). It may be that the process of upgrading or creating a new account has overloaded Kim's routine with the supplied one, instead of vice versa.

On reflection, and re-inspection of the original error message, you should be looking for a routine called JobReport rather than DSJobReport. My bad. Apologies for misleading you. Import from the dsx file, as Kim advises.
:oops:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Ray, you were right the first time. Tony's routine is called JobReport. I saved it in a dsx named DSJobReport.dsx. My bad. :oops:
Mamu Kim
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Thanks Brian. I am not sure why JobReport is not working. It could be a lot of things. This routine was written several years ago before the Designer could document a job. It is not the same. I did post a DOS bat file which document all jobs in a project using the Designer called from the command line. It is in the zip with all the other bat files like DataStageBackup.bat. You would need to modify this to do this for one category. The only way I know to get all jobs in one category is a SELECT statment.

I also give away Dwn_ExecTCL.exe which will run this

SELECT NAME FROM DS_JOBS WHERE CATEGORY = 'MyCat';

It will output the results in Dwn_ExecTCL.log. You need to use this in the above bat to feed in the job names. You will need to suppress headers and column headers with ID.SUP and COL.HDR.SUPP. Not sure the syntax without looking it up.

Run Dwn_ExecTCL.exe and it will tell you the command line options. This is possible but is it worth it.

Once all this html is generated then you really need an index to each job's document. This can be done with GenHtmlFromSql. If any field in a SQL statement ends in .htm or .html then it creates a hyperlink to the document. All of my tools are designed with this idea that documents should be generated and not input. A lot of flexibility in this free stuff as well as DwNav and the products you pay for.
Mamu Kim
bpsprecher
Premium Member
Premium Member
Posts: 21
Joined: Mon Mar 08, 2004 11:42 am

Post by bpsprecher »

DSaveAsBmp was exactly where I was headed when I said I would "check into other options". Your additional information should help provide a satisfactory solution. Once again I shall dupe my boss!

Of course, an even better scenario is that my ADD friends in the QA department will forget about their request while I'm out of the office for a while, and revert to generating documentation in a single-threaded manner. (Less for me to support).

And how correct you are:
...documents should be generated and not input...
Well we've learned a lot. Thanks again Kim & Ray for your time. Marking post as "Workaround".
Brian Sprecher
IBM
Lenexa, KS
Post Reply