retrieving job details within a UBE

STEVE_618

Member
I'm working in E811 and trying to write a report that will send an email attachment using our i series server I want to be able to get the PDF file name to pass to it. Is there a way of retrieving the Job number so that I can fetch the relevant record from the F986110 (or is there a better way!)
 
Hello

Retrieving the JobNumber is possible (it is possible on our Xe, I hope it will be possible on your E811...)

I just finished to write my post in the download section.
I hope it can help you...

I suppose you want to write your "mail" code in the "End Report (future)" event of "Report Level Event Rules" : PDF file does not exist before this event...

Christophe
 
... I think fetching in F986110 is not the better way to retrieve the name of PDF, because of you are not sure that the record already exist when you fetch it, and because of this solution doesn't work on local...

I prefer to re-create the file name according to :
* for server use : ReportId_VersionId_JobNumber_PDF
* for local use : LogFileName retrieved by the function "GetCurrentUbeParameters" in B5500201, replace ".log" by ".pdf"

Christophe
 
Christophe,

Unfortnately, this way will not always work, because some parts of the name may be truncated to satisfy the length limitations of this field.
 
Christophe,

Nice work digging in to find the pointer to the UBEVAR. I think you should keep digging because the output file name is stored off of one of the pointers in that pointer array. I remember seeing it one time, but of course I didn't think to document which one or where.
 
Alex,

You're right : I didn't think about this point...
But what field are you talking about ? Is it the "F986110.FNDFUF2" ? If yes and if PdfFileName is too long for it, is the real PdfFileName truncated ?
In other words : are we sure that FNDFUF2 always match with the PdfFileName on the file system ?

I remember an issue that occurs when our JobNumber became greater than 9999999 : the "F" of the terminating "_PDF" disapeared and our Print Tool (StreamServe) was unable to grab the files (it was looking for them by the FNDFUF2). That means that we can not trust the FNDFUF2, isn'nt it ?

I do not remember exactly this issue, so I'm not really sure...

What do you think of that ?
Thanks
Christophe
 
Yes, that's the field.

Yes, the file name should match, but the version name part of this name may be truncated. I have seen this.

I have not seen the "PDF" part truncated, though, so I cannot comment. If that's correct, than it certainly can be a problem. This is probably a bug, if true. As opposed to the version name truncation, which is by design.
 
Back
Top