<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Use this code</title>
	<atom:link href="http://code.xmlgadgets.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.xmlgadgets.com</link>
	<description>A Developer blog</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:06:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GOTO statement in Easytrieve</title>
		<link>http://code.xmlgadgets.com/2012/02/07/goto-statement-in-easytrieve/</link>
		<comments>http://code.xmlgadgets.com/2012/02/07/goto-statement-in-easytrieve/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 15:06:47 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[Easytrieve]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=309</guid>
		<description><![CDATA[As you would expect, GOTO statement just transfers control directly to the label specified. Below example explains that. LIST ON JOB INPUT NULL DISPLAY 'ONE' GOTO LINE-FOUR DISPLAY 'TWO' DISPLAY 'THREE' LINE-FOUR DISPLAY 'FOUR' STOP Output from this will be ONE FOUR]]></description>
			<content:encoded><![CDATA[<p>As you would expect, GOTO statement just transfers control directly to the label specified. Below example explains that.</p>
<div style="background-color: #f8f8f8">
<pre class="prettyprint"> LIST ON
 JOB INPUT NULL
  DISPLAY 'ONE'
  GOTO LINE-FOUR
  DISPLAY 'TWO'
  DISPLAY 'THREE'
  LINE-FOUR
   DISPLAY 'FOUR'
 STOP</pre>
</div>
<p>Output from this will be</p>
<div style="background-color: black; color: lime">
<pre style="padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px"> ONE
 FOUR</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/02/07/goto-statement-in-easytrieve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site statistics&#8211;where the visitors came from</title>
		<link>http://code.xmlgadgets.com/2012/02/01/site-statisticswhere-the-visitors-came-from/</link>
		<comments>http://code.xmlgadgets.com/2012/02/01/site-statisticswhere-the-visitors-came-from/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 14:47:22 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[site-stats]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=304</guid>
		<description><![CDATA[Top 25 internet providers through which users came from (last 1 month)]]></description>
			<content:encoded><![CDATA[<p>Top 25 internet providers through which users came from (last 1 month)</p>
<p><a href="http://code.xmlgadgets.com/wp-content/uploads/2012/02/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://code.xmlgadgets.com/wp-content/uploads/2012/02/image_thumb.png" width="403" height="733" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/02/01/site-statisticswhere-the-visitors-came-from/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SORT in Easytrieve</title>
		<link>http://code.xmlgadgets.com/2012/01/29/sort-in-easytrieve/</link>
		<comments>http://code.xmlgadgets.com/2012/01/29/sort-in-easytrieve/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 05:19:37 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[Easytrieve]]></category>
		<category><![CDATA[SORT]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=284</guid>
		<description><![CDATA[You can Sort a file into another file in Easytrieve. The Syntax is SORT file-name-1 + TO file-name-2 + USING (field-name [D]...) + [BEFORE proc-name] file-name-1 is the input file DD Name file-name-2 is the Sorted output file field-name is the field defined in file-name-1, based on which the file has to be sorted If [...]]]></description>
			<content:encoded><![CDATA[<p>You can Sort a file into another file in Easytrieve. The Syntax is</p>
<div>
<pre class="prettyprint"> SORT file-name-1 +
 TO file-name-2 +
 USING (field-name [D]...) +
 [BEFORE proc-name]</pre>
</div>
<ul>
<li>file-name-1 is the input file DD Name </li>
<li>file-name-2 is the Sorted output file </li>
<li>field-name is the field defined in file-name-1, based on which the file has to be sorted </li>
<li>If you want the sort to be on Descending order, pass the parameter ‘D’ after the field name (by Default, it will be Ascending) </li>
<li>If you have any select criteria to filter what records to be written in the output file, have it in a Proc and give the proc name with BEFORE parameter (optional) </li>
</ul>
<p>Let us see a couple of sample programs to explain.</p>
<p><strong>Simple Sort on a key</strong></p>
<p>The below program will simply </p>
<div>
<pre class="prettyprint"> FILE INFILE FB(80 960)
   ACCOUNT-NO  1 8 N
*
 FILE OUTFILE
*
 SORT INFILE TO OUTFILE USING ACCOUNT-NO</pre>
</div>
<p>being updated..</p>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/01/29/sort-in-easytrieve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDIT MASKS &#8211; Masking variables in Easytrieve</title>
		<link>http://code.xmlgadgets.com/2012/01/28/edit-masks-masking-variables-in-easytrieve/</link>
		<comments>http://code.xmlgadgets.com/2012/01/28/edit-masks-masking-variables-in-easytrieve/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 07:49:24 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[Easytrieve]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=274</guid>
		<description><![CDATA[have you already read Easytrieve Variable declaration? For creating reports, or printing (displaying) numeric variables, we will always need masking. It can be used to print the decimal character for the variables that have implied decimal WS-SSN W 9 N MASK '999-99-9999' ... MOVE 123456789 TO WS-SSN DISPLAY ' WS-SSN : ' WS-SSN This will [...]]]></description>
			<content:encoded><![CDATA[<p><em>have you already read </em><a href="http://code.xmlgadgets.com/2009/10/07/easytrieve-variable-declaration/"><em>Easytrieve Variable declaration</em></a><em>?</em></p>
<p>For creating reports, or printing (displaying) numeric variables, we will always need masking. It can be used to print the decimal character for the variables that have implied decimal</p>
<div style="background-color: white">
<pre class="prettyprint"> WS-SSN W 9 N MASK '999-99-9999'
 ...
 MOVE 123456789 TO WS-SSN
 DISPLAY ' WS-SSN : ' WS-SSN</pre>
</div>
<p>This will be printed as </p>
<div style="background-color: black; color: lime">
<pre style="padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px"> WS-SSN : 123-45-6789</pre>
</div>
<p>Edit mask pattern is created by using combinations of the following characters:<br />
  <br />9 — causes a digit to print. (including leading zeros) </p>
<p>Z — causes a digit to print (except for leading zeros) </p>
<p>$ — causes a currency symbol to print prior to the first non-zero digit</p>
<p>more examples to come..</p>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/01/28/edit-masks-masking-variables-in-easytrieve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DISPLAY statement in Easytrieve</title>
		<link>http://code.xmlgadgets.com/2012/01/28/display-statement-in-easytrieve/</link>
		<comments>http://code.xmlgadgets.com/2012/01/28/display-statement-in-easytrieve/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 07:09:06 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[Easytrieve]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=267</guid>
		<description><![CDATA[DISPLAY statement in Easytrieve is exactly the same as in COBOL. WS-VAR1 W 20 A VALUE 'I AM INITIALIZED HERE' ... DISPLAY 'value of WS-VAR1 is: ' WS-VAR1 This will be printed as value of WS-VAR1 is: I AM INITIALIZED HERE If you want to continue the DISPLAY statement in multiple lines, use ‘+’ symbol [...]]]></description>
			<content:encoded><![CDATA[<p>DISPLAY statement in Easytrieve is exactly the same as in COBOL.</p>
<div style="background-color: white">
<pre class="prettyprint"> WS-VAR1 W 20 A VALUE 'I AM INITIALIZED HERE'
 ...
 DISPLAY 'value of WS-VAR1 is: ' WS-VAR1</pre>
</div>
<p>This will be printed as</p>
<div style="background-color: black; color: lime">
<pre style="padding: 10px"> value of WS-VAR1 is: I AM INITIALIZED HERE</pre>
</div>
<p>If you want to continue the DISPLAY statement in multiple lines, use ‘+’ symbol as continuation character</p>
<div style="background-color: white">
<pre class="prettyprint"> WS-VAR1 W 20 A VALUE 'I AM INITIALIZED HERE'
 ...
 DISPLAY 'value of WS-VAR1 is: ' +
         WS-VAR1</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/01/28/display-statement-in-easytrieve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easytrieve &#8211; Variable initialization (VALUE clause)</title>
		<link>http://code.xmlgadgets.com/2012/01/28/easytrieve-variable-initialization-value-clause/</link>
		<comments>http://code.xmlgadgets.com/2012/01/28/easytrieve-variable-initialization-value-clause/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 06:54:26 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[Easytrieve]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=265</guid>
		<description><![CDATA[have you already read Easytrieve Variable declaration? Initialising a variable in Easytrieve, can be done using VALUE Clause. WS-VAR1 W 20 A VALUE 'I AM INITIALIZED HERE']]></description>
			<content:encoded><![CDATA[<p><em>have you already read </em><a href="http://code.xmlgadgets.com/2009/10/07/easytrieve-variable-declaration/"><em>Easytrieve Variable declaration</em></a><em>?</em></p>
<p>Initialising a variable in Easytrieve, can be done using VALUE Clause.</p>
<div style="background-color: white">
<pre class="prettyprint"> WS-VAR1 W 20 A VALUE 'I AM INITIALIZED HERE'</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/01/28/easytrieve-variable-initialization-value-clause/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CA11-U11RMS Restart utility parameters</title>
		<link>http://code.xmlgadgets.com/2012/01/26/ca11-u11rms-restart-utility-parameters/</link>
		<comments>http://code.xmlgadgets.com/2012/01/26/ca11-u11rms-restart-utility-parameters/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 12:00:16 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=235</guid>
		<description><![CDATA[CA11 is a utility from Computer Associates that helps to re-run a job multiple times and also to restart from abended steps, taking care of what files to be used when we rerun. We need to specify a restart parameter that tells CA11 &#8211; how we want the job to be run. Valid parameters are nP, [...]]]></description>
			<content:encoded><![CDATA[<p>CA11 is a utility from <a href="http://ca.com">Computer Associates</a> that helps to re-run a job multiple times and also to restart from abended steps, taking care of what files to be used when we rerun.</p>
<p>We need to specify a restart parameter that tells CA11 &#8211; how we want the job to be run. Valid parameters are nP, nR, nN and more (n = 0,1,2,3,..)</p>
<p><strong>P for Production run (0P, 1P, 2P, .. nP)</strong></p>
<ul>
<li>The job will execute from the first step.</li>
<li>if any file with DISP=(NEW,*,*) already exist in catalogue, it will be deleted and re-created as defined in the current JCL job.</li>
</ul>
<p>When we submit a job for first time, a parameter of ‘0P’ will be passed.<br />
Due to any failure, if we need to run the job for a second time, and start from first step, pass a parameter ‘1P’.<br />
If that fails again, and you need to run again from the beginning, use ‘2P’. (and so on…)<br />
<strong>R for Restart/Rerun (1R, 2R, .. nR)</strong></p>
<ul>
<li> the job will start from last abended step</li>
<li> all the files, GDG file versions used in the last run of the job will be used</li>
<li> After the failure of first ‘0P’ run, if we want to restart from the failed step, pass ‘1R’ as the parameter. Consecutive restart runs should have ‘2R’ ,’3R’, and so on..</li>
</ul>
<p><strong>N for Null (1N, 2N,.. nN)</strong></p>
<ul>
<li> CA11 utility will not perform anything, and just allow your job to run.</li>
<li>but for every consecutive run, you need to change the number like 0N, 1N, 2N,.. etc</li>
</ul>
<p><em>Note:</em> if you do not change the number n in the parameter you will be getting a user abend U0060 saying that the parameter was not changes since the last run. However if your job has been completed successfully and you are rerunning the job, you do not need to change the number n.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/01/26/ca11-u11rms-restart-utility-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DIRECT YES and DIRECT NO options in BMC unload plus</title>
		<link>http://code.xmlgadgets.com/2012/01/09/direct-yes-and-direct-no-options-in-bmc-unload-aduumain/</link>
		<comments>http://code.xmlgadgets.com/2012/01/09/direct-yes-and-direct-no-options-in-bmc-unload-aduumain/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 16:25:40 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[BMC]]></category>
		<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=228</guid>
		<description><![CDATA[DIRECT YES: When we use DIRECT YES option, BMC Unload Plus utility (ADUUMAIN) reads data directly from the table space data set or image copy data set and uses a SELECT-like syntax for data selection. We can unload all data from a table-space without requiring written SELECT statements. The data can be sorted by clustering key or [...]]]></description>
			<content:encoded><![CDATA[<p><strong>DIRECT YES:</strong></p>
<p>When we use DIRECT YES option, BMC Unload Plus utility (ADUUMAIN) reads data directly from the table space data set or image copy data set and uses a SELECT-like syntax for data selection.</p>
<p>We can unload all data from a table-space without requiring written SELECT statements.</p>
<p>The data can be sorted by clustering key or partitioning key.</p>
<p><strong>DIRECT NO:</strong></p>
<p>When we use DIRECT NO option, BMC Unload Plus utility uses DB2 dynamic SQL to process the SELECT statement.</p>
<p>Data type conversions can be performed using DIRECT NO (which is not available with DIRECT YES).</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2012/01/09/direct-yes-and-direct-no-options-in-bmc-unload-aduumain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STRING and UNSTRING verbs in COBOL</title>
		<link>http://code.xmlgadgets.com/2011/12/13/string-and-unstring-verbs-in-cobol/</link>
		<comments>http://code.xmlgadgets.com/2011/12/13/string-and-unstring-verbs-in-cobol/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 13:15:10 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[COBOL]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=224</guid>
		<description><![CDATA[STRING WS-VAR1 ',' WS-VAR2 DELIMITED BY SIZE INTO WS-STRING UNSTRING ws-comma-separated DELIMITED BY ',' INTO WS-parm1 , WS-parm2 , WS-parm3 , WS-parm4 , WS-parm5 END-UNSTRING]]></description>
			<content:encoded><![CDATA[<div style="background-color: white;">
<pre class="prettyprint">
STRING WS-VAR1 ',' WS-VAR2 DELIMITED BY SIZE INTO WS-STRING

UNSTRING ws-comma-separated
  DELIMITED BY ','
    INTO  WS-parm1
        , WS-parm2
        , WS-parm3
        , WS-parm4
        , WS-parm5
 END-UNSTRING
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2011/12/13/string-and-unstring-verbs-in-cobol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DB2 commands : TERM, START, STOP, DIS</title>
		<link>http://code.xmlgadgets.com/2011/11/14/db2-commands-term-start-stop-dis/</link>
		<comments>http://code.xmlgadgets.com/2011/11/14/db2-commands-term-start-stop-dis/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 14:35:43 +0000</pubDate>
		<dc:creator>Karthik</dc:creator>
				<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://code.xmlgadgets.com/?p=216</guid>
		<description><![CDATA[- DIS or -Display : Display a status of tablespace (ie READ-WRITE / COPY-PENDING / CHECK-PENDING / READ ONLY) -DIS DATABASE(dbname) SPACENAM(tbspace) more on Display Database Stop / Start a tablespace / indexspace: -STOP DATABASE(dbname) SPACENAM(tbspace) -START DATABASE(dbname) SPACENAM(tbspace) ACCESS(FORCE) Start: publib.boulder.ibm.com/../bjncstdb999243.htm Stop: publib.boulder.ibm.com/../bjncstod999243.htm How to find a table&#8217;s Database name and tablespace name? SELECT [...]]]></description>
			<content:encoded><![CDATA[<p>- DIS   or -Display  : Display a status of tablespace (ie READ-WRITE / COPY-PENDING / CHECK-PENDING / READ ONLY)</p>
<div style="background-color: white;">
<pre class="prettyprint">-DIS  DATABASE(dbname) SPACENAM(tbspace)</pre>
</div>
<p>more on <a href="http://ibmsystemsmag.blogs.com/db2utor/2011/11/using-the-display-database-command.html">Display Database</a></p>
<p>Stop / Start a tablespace / indexspace:</p>
<div style="background-color: white;">
<pre class="prettyprint">-STOP  DATABASE(dbname) SPACENAM(tbspace)
-START  DATABASE(dbname) SPACENAM(tbspace) ACCESS(FORCE)</pre>
</div>
<p>Start: <a href="http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db2.doc.comref/bjncstdb999243.htm">publib.boulder.ibm.com/../bjncstdb999243.htm</a></p>
<p>Stop: <a href="http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db2.doc.comref/bjncstod999243.htm">publib.boulder.ibm.com/../bjncstod999243.htm</a><br />
<strong>How to find a table&#8217;s Database name and tablespace name?</strong></p>
<div style="background-color: white;">
<pre class="prettyprint">SELECT DBNAME, TSNAME FROM
SYSIBM.SYSTABLES WHERE NAME = [table name]
 AND OWNER = [qualifier] ;
</pre>
</div>
<div style="background-color: white;">
<pre class="prettyprint">SELECT DBNAME, TSNAME FROM
SYSIBM.SYSTABLES WHERE NAME = 'SYSDUMMY1' AND
OWNER = 'SYSIBM';</pre>
</div>
<p><strong>Terminating a BMC (or any DB2) utility:</strong><br />
issue the Terminate Utility command:<br />
 -TER UTILITY([util id])<br />
TERM: <a href="http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db2.doc.comref/ctermu.htm">publib.boulder.ibm.com/../ctermu.htm</a></pre>
]]></content:encoded>
			<wfw:commentRss>http://code.xmlgadgets.com/2011/11/14/db2-commands-term-start-stop-dis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.363 seconds -->
<!-- Cached page served by WP-Cache -->

