 




<?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: souce file listing</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/souce-file-listing/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/souce-file-listing/</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 14:10:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/souce-file-listing/#comment-71285</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 07 Dec 2009 01:22:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-71285</guid>
		<description><![CDATA[BTW, if you have a second question, then create a new question. Don&#039;t bury it in the discussion of an unrelated question. That does a disservice to those come later looking for solutions.

Tom]]></description>
		<content:encoded><![CDATA[<p>BTW, if you have a second question, then create a new question. Don&#8217;t bury it in the discussion of an unrelated question. That does a disservice to those come later looking for solutions.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mtharp</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/souce-file-listing/#comment-49055</link>
		<dc:creator>mtharp</dc:creator>
		<pubDate>Fri, 12 May 2006 09:45:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-49055</guid>
		<description><![CDATA[I use the C procedure (binding directory QC2LE) called system to execute commands within an RPG program.  This takes less lines of code and is extremely flexible.  Here is how it can be used:

H bnddir(&#039;QC2LE&#039;)

D System      pr         10i 0 ExtProc(&#039;system&#039;)
D                          *   Value Options(*string)

D MsgId       s           7a   Import(&#039;_EXCP_MSGID&#039;)

 /free
      If System(&#039;CRTPF FILE(QTEMP/PF1) RCDLEN(80)&#039;)  0 ;
        ErrorMsg = &#039;Error &#039; + %trim(MsgId) + &#039; received.&#039; ;
      EndIf ;
 /end-free]]></description>
		<content:encoded><![CDATA[<p>I use the C procedure (binding directory QC2LE) called system to execute commands within an RPG program.  This takes less lines of code and is extremely flexible.  Here is how it can be used:</p>
<p>H bnddir(&#8216;QC2LE&#8217;)</p>
<p>D System      pr         10i 0 ExtProc(&#8216;system&#8217;)<br />
D                          *   Value Options(*string)</p>
<p>D MsgId       s           7a   Import(&#8216;_EXCP_MSGID&#8217;)</p>
<p> /free<br />
      If System(&#8216;CRTPF FILE(QTEMP/PF1) RCDLEN(80)&#8217;)  0 ;<br />
        ErrorMsg = &#8216;Error &#8216; + %trim(MsgId) + &#8216; received.&#8217; ;<br />
      EndIf ;<br />
 /end-free</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: astradyne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/souce-file-listing/#comment-49056</link>
		<dc:creator>astradyne</dc:creator>
		<pubDate>Fri, 12 May 2006 05:02:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-49056</guid>
		<description><![CDATA[Hi

I&#039;m a little confused - there&#039;s nothing stopping you from using compilation commands, e.g. CRTPF, CRTCLPGM, etc, or indeed any command from within a CL program.  Actually, that&#039;s not entirely true, there are some commands that aren&#039;t allowed to be used from within programs, but the compilation commands aren&#039;t any of them.

In your CL program just code the command with the appropriate parameters,  For example:

CRTPF FILE(QTEMP/WORKFILE) RCDLEN(80)

or whatever.

In RPG you can run commands by using either the QCMDEXC or QCAPCMD system API&#039;s.  The QCMDEXC is easier to code, but doesn&#039;t return any completion status to the program whereas the QCAPCMD does.

To use the QCAPCMD you need to include the following in your RPG program:


      *-----------------------------------------------------   
      *  Common API Error Structure                            
      *-----------------------------------------------------   
                                                               
     D/IF     NOT DEFINED(API_ERROR)                           
     D/DEFINE API_ERROR                                        
                                                               
     D ApiError        DS                                      
     D   ApiBytes                    10I 0 Inz(%Size(ApiError))
     D   ApiBytesOut                 10I 0                     
     D   ApiErrID                     7A                       
     D   ApiReserved                  1A                       
     D   ApiErInDta                 256A                       
                                                               
     D/ENDIF                                                   

      *-----------------------------------------------------       
      *  Process Command API                                       
      *-----------------------------------------------------       
                                                                   
     D QcaPCmd         Pr                  ExtPgm(&#039;QCAPCMD&#039;)       
     D  aCmd                      32767a   Const Options(*VarSize) 
     D  aCmdLen                      10i 0 Const                   
     D  aCtlBlk                   32767a   Const Options(*VarSize) 
     D  aCtlBlkLen                   10i 0 Const                   
     D  aCtlBlkFmt                    8a   Const                   
     D  aRtnCmd                   32767a   Options(*VarSize)       
     D  aRtnCmdAvl                   10i 0 Const                   
     D  aRtnCmdLen                   10i 0                         
     D  aApiError                          Like(ApiError)          
                                                                   
     D CPOP0100        Ds                                          
     D  capPrcType                   10i 0 Inz(0)                  
     D  capDBCS                       1a   Inz(&#039;0&#039;)      
     D  capPrompt                     1a   Inz(&#039;0&#039;)      
     D  capSyntax                     1a   Inz(&#039;0&#039;)      
     D  capMsgKey                     4a                 
     D  capReserved                   9a   Inz(*Allx&#039;00&#039;)
                                                         
     D CmdFailed       c                   Const(&#039;3&#039;)    
     D CmdSuccessful   c                   Const(&#039;4&#039;)    


     D  iCmd                      32767a   Options(*VarSize)
     D wCmd            s          32767a                          
     D wCmdLen         s             10i 0                        

And then to call it use something like:

     C                   CallP(e)  QcaPCmd(iCmd              :
     C                                     %Len(%Trim(iCmd)) :
     C                                     CPOP0100          :
     C                                     %Len(CPOP0100)    :
     C                                     &#039;CPOP0100&#039;        :
     C                                     wCmd              :
     C                                     32767             :
     C                                     wCmdLen           :
     C                                     ApiError)          

Hope it helps.

Jonathan]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I&#8217;m a little confused &#8211; there&#8217;s nothing stopping you from using compilation commands, e.g. CRTPF, CRTCLPGM, etc, or indeed any command from within a CL program.  Actually, that&#8217;s not entirely true, there are some commands that aren&#8217;t allowed to be used from within programs, but the compilation commands aren&#8217;t any of them.</p>
<p>In your CL program just code the command with the appropriate parameters,  For example:</p>
<p>CRTPF FILE(QTEMP/WORKFILE) RCDLEN(80)</p>
<p>or whatever.</p>
<p>In RPG you can run commands by using either the QCMDEXC or QCAPCMD system API&#8217;s.  The QCMDEXC is easier to code, but doesn&#8217;t return any completion status to the program whereas the QCAPCMD does.</p>
<p>To use the QCAPCMD you need to include the following in your RPG program:</p>
<p>      *&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
      *  Common API Error Structure<br />
      *&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;   </p>
<p>     D/IF     NOT DEFINED(API_ERROR)<br />
     D/DEFINE API_ERROR                                        </p>
<p>     D ApiError        DS<br />
     D   ApiBytes                    10I 0 Inz(%Size(ApiError))<br />
     D   ApiBytesOut                 10I 0<br />
     D   ApiErrID                     7A<br />
     D   ApiReserved                  1A<br />
     D   ApiErInDta                 256A                       </p>
<p>     D/ENDIF                                                   </p>
<p>      *&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
      *  Process Command API<br />
      *&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;       </p>
<p>     D QcaPCmd         Pr                  ExtPgm(&#8216;QCAPCMD&#8217;)<br />
     D  aCmd                      32767a   Const Options(*VarSize)<br />
     D  aCmdLen                      10i 0 Const<br />
     D  aCtlBlk                   32767a   Const Options(*VarSize)<br />
     D  aCtlBlkLen                   10i 0 Const<br />
     D  aCtlBlkFmt                    8a   Const<br />
     D  aRtnCmd                   32767a   Options(*VarSize)<br />
     D  aRtnCmdAvl                   10i 0 Const<br />
     D  aRtnCmdLen                   10i 0<br />
     D  aApiError                          Like(ApiError)          </p>
<p>     D CPOP0100        Ds<br />
     D  capPrcType                   10i 0 Inz(0)<br />
     D  capDBCS                       1a   Inz(&#8217;0&#8242;)<br />
     D  capPrompt                     1a   Inz(&#8217;0&#8242;)<br />
     D  capSyntax                     1a   Inz(&#8217;0&#8242;)<br />
     D  capMsgKey                     4a<br />
     D  capReserved                   9a   Inz(*Allx&#8217;00&#8242;)</p>
<p>     D CmdFailed       c                   Const(&#8217;3&#8242;)<br />
     D CmdSuccessful   c                   Const(&#8217;4&#8242;)    </p>
<p>     D  iCmd                      32767a   Options(*VarSize)<br />
     D wCmd            s          32767a<br />
     D wCmdLen         s             10i 0                        </p>
<p>And then to call it use something like:</p>
<p>     C                   CallP(e)  QcaPCmd(iCmd              :<br />
     C                                     %Len(%Trim(iCmd)) :<br />
     C                                     CPOP0100          :<br />
     C                                     %Len(CPOP0100)    :<br />
     C                                     &#8216;CPOP0100&#8242;        :<br />
     C                                     wCmd              :<br />
     C                                     32767             :<br />
     C                                     wCmdLen           :<br />
     C                                     ApiError)          </p>
<p>Hope it helps.</p>
<p>Jonathan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sairolla</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/souce-file-listing/#comment-49057</link>
		<dc:creator>sairolla</dc:creator>
		<pubDate>Fri, 12 May 2006 03:50:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-49057</guid>
		<description><![CDATA[thanks a lot!! for the help...

but meanwhile i have got another problem...in my project- i have to use COMPILE commands such as CRTPF, CRTCLPPGM, CRTRPGPGM and so on...in a program and this has to be transparent to the user.

in CL these programs cannot be used...

how can i do this?

plz help me out!
]]></description>
		<content:encoded><![CDATA[<p>thanks a lot!! for the help&#8230;</p>
<p>but meanwhile i have got another problem&#8230;in my project- i have to use COMPILE commands such as CRTPF, CRTCLPPGM, CRTRPGPGM and so on&#8230;in a program and this has to be transparent to the user.</p>
<p>in CL these programs cannot be used&#8230;</p>
<p>how can i do this?</p>
<p>plz help me out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: astradyne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/souce-file-listing/#comment-49058</link>
		<dc:creator>astradyne</dc:creator>
		<pubDate>Thu, 11 May 2006 08:43:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-49058</guid>
		<description><![CDATA[Use the DSPFD command and specify *MBRLIST for the type of information that you want to retrieve

DSPFD FILE(library/srcfile)
      TYPE(*MBRLIST)           
      OUTPUT(*OUTFILE)         
      OUTFILE(QTEMP/MEMBERS)   

Will create a database file called MEMBERS in QTEMP that contains all of the members in the specified source file.  This file can then be read in your subfile program.

Jonathan]]></description>
		<content:encoded><![CDATA[<p>Use the DSPFD command and specify *MBRLIST for the type of information that you want to retrieve</p>
<p>DSPFD FILE(library/srcfile)<br />
      TYPE(*MBRLIST)<br />
      OUTPUT(*OUTFILE)<br />
      OUTFILE(QTEMP/MEMBERS)   </p>
<p>Will create a database file called MEMBERS in QTEMP that contains all of the members in the specified source file.  This file can then be read in your subfile program.</p>
<p>Jonathan</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.013 seconds using memcached
Object Caching 324/327 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 14:53:59 -->