 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How do I retrieve the JOB/USER/NBR for a spoolfile generated by a GUI program?</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-retrieve-the-jobusernbr-for-a-spoolfile-generated-by-a-gui-program/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-retrieve-the-jobusernbr-for-a-spoolfile-generated-by-a-gui-program/</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 20:47:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: astradyne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-retrieve-the-jobusernbr-for-a-spoolfile-generated-by-a-gui-program/#comment-41650</link>
		<dc:creator>astradyne</dc:creator>
		<pubDate>Tue, 08 Nov 2005 20:52:37 +0000</pubDate>
		<guid isPermaLink="false">#comment-41650</guid>
		<description><![CDATA[QPRTJOB is a job that is automatically created by the system when your job tries to create a spool file and the job&#039;s current user ID is different to the user ID that the job is running under.

For example, in your GUI application, the HTTP server job starts running under user QTMHHTTP.  When you then logon to the job as, for example, user JDOE the system recognises that the current user profile has changed and directs all spooled output to job QPRTJOB/JDOE/nnnnnn.

Each QPRTJOB can hold up to 9999 spool files, after which a new QPRTJOB job is created for the user.  The QPRTJOB remains active and is re-used until either 9999 spool files are created for the job, or all spool files for the job have been deleted and there have been no more spool files written for 24 hours.

I would try using the QUSLJOB (List Jobs) API, specifying a job name of QPRTJOB/user_id/*ALL and a status of *ACTIVE.  This should create an entry in a user space which you can then interrogate to get the full job name back.

Hope it helps

Jonathan
]]></description>
		<content:encoded><![CDATA[<p>QPRTJOB is a job that is automatically created by the system when your job tries to create a spool file and the job&#8217;s current user ID is different to the user ID that the job is running under.</p>
<p>For example, in your GUI application, the HTTP server job starts running under user QTMHHTTP.  When you then logon to the job as, for example, user JDOE the system recognises that the current user profile has changed and directs all spooled output to job QPRTJOB/JDOE/nnnnnn.</p>
<p>Each QPRTJOB can hold up to 9999 spool files, after which a new QPRTJOB job is created for the user.  The QPRTJOB remains active and is re-used until either 9999 spool files are created for the job, or all spool files for the job have been deleted and there have been no more spool files written for 24 hours.</p>
<p>I would try using the QUSLJOB (List Jobs) API, specifying a job name of QPRTJOB/user_id/*ALL and a status of *ACTIVE.  This should create an entry in a user space which you can then interrogate to get the full job name back.</p>
<p>Hope it helps</p>
<p>Jonathan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bradskk</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-retrieve-the-jobusernbr-for-a-spoolfile-generated-by-a-gui-program/#comment-41651</link>
		<dc:creator>bradskk</dc:creator>
		<pubDate>Tue, 08 Nov 2005 11:45:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-41651</guid>
		<description><![CDATA[Sorry about that.  We use the RTVSPLFID so much that I didn&#039;t even realize that it was from our old copy of TAATOOLS.]]></description>
		<content:encoded><![CDATA[<p>Sorry about that.  We use the RTVSPLFID so much that I didn&#8217;t even realize that it was from our old copy of TAATOOLS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: orelalaith</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-retrieve-the-jobusernbr-for-a-spoolfile-generated-by-a-gui-program/#comment-41652</link>
		<dc:creator>orelalaith</dc:creator>
		<pubDate>Tue, 08 Nov 2005 10:14:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-41652</guid>
		<description><![CDATA[I apoligize in advance if this isn&#039;t the right way to answer replies; but unfortunately I think I need some more input for the former two replies:

-------------------------------------------------------
I guess I wasn&#039;t specific; I tried to use RTVJOBA, then I tried to use QUSRJOBI; they both came back with the actual Job information. (Job: VOI;  User: QTMHHTTP;  Number: 303484)

I also tried to do a WRKJOB on the HTTP job, but couldn&#039;t find anything to tell me where that spoolfile was going.

----------------------------------------------------------
I don&#039;t see RTVSPLFID on this AS400, and I see that it&#039;s a TAA productivity tool.  I&#039;m pretty low on the upgrading chain of command I&#039;m afraid, esp if it&#039;s something that requires payment.  Is there any other way to retrieve this information?
]]></description>
		<content:encoded><![CDATA[<p>I apoligize in advance if this isn&#8217;t the right way to answer replies; but unfortunately I think I need some more input for the former two replies:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
I guess I wasn&#8217;t specific; I tried to use RTVJOBA, then I tried to use QUSRJOBI; they both came back with the actual Job information. (Job: VOI;  User: QTMHHTTP;  Number: 303484)</p>
<p>I also tried to do a WRKJOB on the HTTP job, but couldn&#8217;t find anything to tell me where that spoolfile was going.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
I don&#8217;t see RTVSPLFID on this AS400, and I see that it&#8217;s a TAA productivity tool.  I&#8217;m pretty low on the upgrading chain of command I&#8217;m afraid, esp if it&#8217;s something that requires payment.  Is there any other way to retrieve this information?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bradskk</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-retrieve-the-jobusernbr-for-a-spoolfile-generated-by-a-gui-program/#comment-41653</link>
		<dc:creator>bradskk</dc:creator>
		<pubDate>Tue, 08 Nov 2005 09:00:55 +0000</pubDate>
		<guid isPermaLink="false">#comment-41653</guid>
		<description><![CDATA[As long as you know the name of the spoolfile (SplName) and you go after the information before printing the next one of that name you can use the following in a CL retrieving the USER, JOB NUMBER and the SPL NUMBER

RTVSPLFID  SPLF(SplName) SPLNBR(*LAST) RTNUSER(&amp;SPUSER) +
             RTNJOBNBR(&amp;SPJOBN) RTNSPLNBR(&amp;SPLFNO)    ]]></description>
		<content:encoded><![CDATA[<p>As long as you know the name of the spoolfile (SplName) and you go after the information before printing the next one of that name you can use the following in a CL retrieving the USER, JOB NUMBER and the SPL NUMBER</p>
<p>RTVSPLFID  SPLF(SplName) SPLNBR(*LAST) RTNUSER(&amp;SPUSER) +<br />
             RTNJOBNBR(&amp;SPJOBN) RTNSPLNBR(&amp;SPLFNO)    </p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.050 seconds using memcached
Object Caching 309/315 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-23 21:11:31 -->