views:

77

answers:

3

I am looking for a program or API call that will give me, with absolute accuracy, the name of the Workstation Display File (and Its Record Type) that is being used by a given Job. I have the Job information (such as Job Name, Job User, and Job Number. This will allow me to quickly identify the Display File that a given job to assist in program development. If I can do this in RPGLE then I can share it over a SQL Connection to my interface/telnet program.

I have looked at using the Job List of Open Objects API (QDMLOPNF) and a combination of the Job Stack API (QWVRCSTK) but they do not give me the accuracy I need. They also assume that I know what DDS is attached to program, but if it is a system program or non standard program the results are not accurate. Please help me.

Thank you, in advance.

A: 

Have you considered looking into IceBreak. Should be very easy to do screen scraping with and present on a web page. At one time there was talk about a free version. http://www.icebreak.dk/

Thorbjørn Ravn Andersen
No, I need a way to get the DDS from telnet, I'm not looking to replace the solution I already have.
Justin
+1  A: 

You can find this manually with the DSPJOB OPTION(*OPNF) command and look for open files of type DSP.

There is a job API available that may provide this information as well.

JamesA
That wasn't the direct API, but it did point me in the right direction. I use this to pull up the job information and then QDMLOPNF to follow the user as a new screen is requested. Its fast, easy, and saves me time!
Justin
Not quite the answer. I just found out that it shows all DDS's that are active. I was assuming that the last one in the stack was active. However after some testing I found that not to be the case, and because we have multiple DDS with the same signature, I have no clue which one is directly active.
Justin
If the Job API does its not physical documented properly. I could not find a format that seemed to give me this information. Unless I'm missing another part or something.
Justin
+1  A: 

After much research and Google-ing I located an API that does exactly what I need it to. It's the Retriieve Output Information (QWSRTVOI) API and i found through an IBM API Documentation located here: http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/wss.pdf.

Hope this helps anyone that was just as frustrated as me. IBM has to do it, so I knew there had to be an API to let me do it.

Justin
Was this the final answer? There is currently an open bounty for this question.
JamesA
Extraordinarily close to it with one or two problems, but yes it is.
Justin