 




<?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: Can I open a display file from a batch job?</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 03:14:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: developerallen</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/#comment-95290</link>
		<dc:creator>developerallen</dc:creator>
		<pubDate>Mon, 15 Aug 2011 18:55:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-95290</guid>
		<description><![CDATA[Thanks for the suggestions.  The simplest solution was to just move the DDS for the screen file to the working storage section and do &quot;read into&quot; and &quot;read from&quot; for the screen IO&#039;s. 

Thanks again.]]></description>
		<content:encoded><![CDATA[<p>Thanks for the suggestions.  The simplest solution was to just move the DDS for the screen file to the working storage section and do &#8220;read into&#8221; and &#8220;read from&#8221; for the screen IO&#8217;s. </p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/#comment-94980</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 04 Aug 2011 02:27:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-94980</guid>
		<description><![CDATA[&lt;i&gt;I guess you’re starting from RPGII or III in terms of design,...&lt;/i&gt;

The &#039;9C&#039; file status (&quot;Acquire failed; session was not started.&quot;) plus the &quot;COBOL&quot; tag on the question pretty much says this is all COBOL. That should make it easier than trying to do the same with RPG II/III, but still probably not a trivial task.

If the program already does its work in Working Storage, it&#039;ll be easier. If it doesn&#039;t, then making changes to reference definitions in Working Storage should be the first step. Then it could mostly be conditioning file I/O on some external element, perhaps just a test if it&#039;s running in batch or not.

And, of course, some kind of entry point into the program would have to be established along with appropriate exit... but that&#039;s just a &quot;small matter of programming&quot;.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>I guess you’re starting from RPGII or III in terms of design,&#8230;</i></p>
<p>The &#8217;9C&#8217; file status (&#8220;Acquire failed; session was not started.&#8221;) plus the &#8220;COBOL&#8221; tag on the question pretty much says this is all COBOL. That should make it easier than trying to do the same with RPG II/III, but still probably not a trivial task.</p>
<p>If the program already does its work in Working Storage, it&#8217;ll be easier. If it doesn&#8217;t, then making changes to reference definitions in Working Storage should be the first step. Then it could mostly be conditioning file I/O on some external element, perhaps just a test if it&#8217;s running in batch or not.</p>
<p>And, of course, some kind of entry point into the program would have to be established along with appropriate exit&#8230; but that&#8217;s just a &#8220;small matter of programming&#8221;.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/#comment-94933</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Wed, 03 Aug 2011 08:03:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-94933</guid>
		<description><![CDATA[If I understand this, you have a function which reads/writes to the screen, and validates the data - hopefully in a subroutine.

You want to use this hypothetical subroutine to validate data coming from the screen via the screen format record, or to validate data provided from a database file record. 

It seem to me that you need 3 functions - interactive that callsa validation module, batch file reading which calls a validation module, and the validation module. 

Whether you abstract the validation into
- /COPY source
- a *PGM 
- a *MODULE 
- a procedure and *SRVPGM

is immaterial;.   I guess you&#039;re starting from RPGII or III in terms of design, so gathering all the input / output and return code(s) into a suitable interface / record layout / data structure (your choice) should be simple, if exacting. Testing such a routine is easy and precise.  Testing the calling routines becomes equally simple. 



If you spend some time with the architecture and design of the functionality, then programming will be straightforward.  Overall savings in lifetime costs (and development/testing costs) accrue from making this simple and testable right up front.]]></description>
		<content:encoded><![CDATA[<p>If I understand this, you have a function which reads/writes to the screen, and validates the data &#8211; hopefully in a subroutine.</p>
<p>You want to use this hypothetical subroutine to validate data coming from the screen via the screen format record, or to validate data provided from a database file record. </p>
<p>It seem to me that you need 3 functions &#8211; interactive that callsa validation module, batch file reading which calls a validation module, and the validation module. </p>
<p>Whether you abstract the validation into<br />
- /COPY source<br />
- a *PGM<br />
- a *MODULE<br />
- a procedure and *SRVPGM</p>
<p>is immaterial;.   I guess you&#8217;re starting from RPGII or III in terms of design, so gathering all the input / output and return code(s) into a suitable interface / record layout / data structure (your choice) should be simple, if exacting. Testing such a routine is easy and precise.  Testing the calling routines becomes equally simple. </p>
<p>If you spend some time with the architecture and design of the functionality, then programming will be straightforward.  Overall savings in lifetime costs (and development/testing costs) accrue from making this simple and testable right up front.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/#comment-94897</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 02 Aug 2011 06:56:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-94897</guid>
		<description><![CDATA[You can open a display file in batch if you use the ACQUIRE statement to acquire a device to display the display file on. Of course, that brings a few logic changes to say the least.

But the question isn&#039;t totally clear.

&lt;i&gt;...to gain access to it&#039;s field names.&lt;/i&gt;

You don&#039;t have to open a file to get access to field names. You seem to want access to field values rather than names, and you can use the field definitions to store and retrieve values without opening the file.

Your big problem seems to be that the program directly references fields under the FD rather than in Working Storage. The record(s) defined under the FD is essentially in the I/O buffer. The program probably shouldn&#039;t be referencing fields there to begin with. Instead, definitions should be in Working Storage where the program can READ ... INTO and WRITE ... FROM.

If all work is in Working Storage, the file doesn&#039;t need to be opened. Just bypass the I/O statements.

Tom]]></description>
		<content:encoded><![CDATA[<p>You can open a display file in batch if you use the ACQUIRE statement to acquire a device to display the display file on. Of course, that brings a few logic changes to say the least.</p>
<p>But the question isn&#8217;t totally clear.</p>
<p><i>&#8230;to gain access to it&#8217;s field names.</i></p>
<p>You don&#8217;t have to open a file to get access to field names. You seem to want access to field values rather than names, and you can use the field definitions to store and retrieve values without opening the file.</p>
<p>Your big problem seems to be that the program directly references fields under the FD rather than in Working Storage. The record(s) defined under the FD is essentially in the I/O buffer. The program probably shouldn&#8217;t be referencing fields there to begin with. Instead, definitions should be in Working Storage where the program can READ &#8230; INTO and WRITE &#8230; FROM.</p>
<p>If all work is in Working Storage, the file doesn&#8217;t need to be opened. Just bypass the I/O statements.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: developerallen</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/#comment-94872</link>
		<dc:creator>developerallen</dc:creator>
		<pubDate>Mon, 01 Aug 2011 19:53:41 +0000</pubDate>
		<guid isPermaLink="false">#comment-94872</guid>
		<description><![CDATA[I trying to use the existing logic in a very large program to edit data coming from an external source.  I don&#039;t want to rewrite a very complicated program, nor do I want to have a copy that then must be maintained.

I first load the data from my external source into the appropriate databases.  I then call the interactive module to editupdateprocess the data.  I set a switch to turn off the actual screen displays when extrnal data is being processed.  This works fine when I call the job from my desktop, but fails in batch because of *requestor.  I just need a way to get the screen fields active without actually readingwriting to the screen.  I think OVRDSPF may help, but i am not sure what to do.]]></description>
		<content:encoded><![CDATA[<p>I trying to use the existing logic in a very large program to edit data coming from an external source.  I don&#8217;t want to rewrite a very complicated program, nor do I want to have a copy that then must be maintained.</p>
<p>I first load the data from my external source into the appropriate databases.  I then call the interactive module to editupdateprocess the data.  I set a switch to turn off the actual screen displays when extrnal data is being processed.  This works fine when I call the job from my desktop, but fails in batch because of *requestor.  I just need a way to get the screen fields active without actually readingwriting to the screen.  I think OVRDSPF may help, but i am not sure what to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepu9321</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/can-i-open-a-display-file-from-a-batch-job/#comment-94844</link>
		<dc:creator>deepu9321</dc:creator>
		<pubDate>Mon, 01 Aug 2011 05:45:54 +0000</pubDate>
		<guid isPermaLink="false">#comment-94844</guid>
		<description><![CDATA[We can&#039;t directly open a display file from a batch job.
It will display the following error with error code &#039;CPF4103&#039;
&quot;Device *REQUESTER not found while opening file DISPFILE in LIBRARY&quot;

If we want to open a display file from a batch job, it must acquire a device.
and there might be need to handle a display file in USROPN mode based on the type of job(Batch or Interactive).

Pradeep.]]></description>
		<content:encoded><![CDATA[<p>We can&#8217;t directly open a display file from a batch job.<br />
It will display the following error with error code &#8216;CPF4103&#8242;<br />
&#8220;Device *REQUESTER not found while opening file DISPFILE in LIBRARY&#8221;</p>
<p>If we want to open a display file from a batch job, it must acquire a device.<br />
and there might be need to handle a display file in USROPN mode based on the type of job(Batch or Interactive).</p>
<p>Pradeep.</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 6/9 queries in 0.012 seconds using memcached
Object Caching 338/341 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 14:01:15 -->