 




<?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: CL/400</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/cl400-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/cl400-3/</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: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl400-3/#comment-79885</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 31 Jul 2010 07:54:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-79885</guid>
		<description><![CDATA[A very similar question was asked earlier. Almost so similar that I would think it was a homework question.

Even so, at the time of the earlier question, I couldn&#039;t make much sense of what was wanted. This time it makes a little more sense.

The program (or procedure) will accept two parms, a date variable in some knoen format a a code letter. Each code letter will correspond to a specific date format. When the code letter is &#039;j&#039;, the program should convert the input date to *MDY format. When the code is &#039;M&#039;, the conversion should be to *JUL format. The output should be in the form of a message sent with SNDPGMMSG.

The format of the input date is critical. It seems possible that code &#039;j&#039; means that the input date is in julian format and should be converted to *MDY. Code &#039;M&#039; would provide the opposite conversion.

Unfortunately, if this is indeed homework, the question should identify it as homework, should show the work that has already been done and should describe what obstacle needs explanation.

Answers should be limited to explanation of the meaning of the obstacle and methods to overcome it. Answers should be guidance rather than straight substitution of work.

Students can benefit from professional guidance.

Tom]]></description>
		<content:encoded><![CDATA[<p>A very similar question was asked earlier. Almost so similar that I would think it was a homework question.</p>
<p>Even so, at the time of the earlier question, I couldn&#8217;t make much sense of what was wanted. This time it makes a little more sense.</p>
<p>The program (or procedure) will accept two parms, a date variable in some knoen format a a code letter. Each code letter will correspond to a specific date format. When the code letter is &#8216;j&#8217;, the program should convert the input date to *MDY format. When the code is &#8216;M&#8217;, the conversion should be to *JUL format. The output should be in the form of a message sent with SNDPGMMSG.</p>
<p>The format of the input date is critical. It seems possible that code &#8216;j&#8217; means that the input date is in julian format and should be converted to *MDY. Code &#8216;M&#8217; would provide the opposite conversion.</p>
<p>Unfortunately, if this is indeed homework, the question should identify it as homework, should show the work that has already been done and should describe what obstacle needs explanation.</p>
<p>Answers should be limited to explanation of the meaning of the obstacle and methods to overcome it. Answers should be guidance rather than straight substitution of work.</p>
<p>Students can benefit from professional guidance.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: woodengineer</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/cl400-3/#comment-56523</link>
		<dc:creator>woodengineer</dc:creator>
		<pubDate>Thu, 18 Sep 2008 15:45:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-56523</guid>
		<description><![CDATA[Here is a sample of code from an old RPG program we still use that accomplishes what you request.  We call it from the CL.  It returns the results to the CL program.
This section of code gives you an idea of how this can be done:

 C     *MDY0         TEST (D)                DAT_C6                 51       (*IN51 On if date test failed)
 C                   IF        NOT *IN51                                                     (Date is in MMDDYY format)
 C                  do something here                        
 C                  GOTO      @TAG01                                      
 C                   ENDIF                                                 
  *                                                                        
 C     *CYMD0        TEST (D)                DAT_C7                 51     (test for CYYMMDD format without separator)
 C                   IF        NOT *IN51                                                     (Date is in CYYMMDD format)
 C                   do something here           
 C                   GOTO      @TAG01                                      
 C                   ENDIF                                                 
                                                                           
 C     *YMD0         TEST(D)                 DAT_C6                 51     (test of YYMMDD format without separator)
 C                   IF        NOT *IN51                                                   (Date is in YYMMDD format)
 C                  do something here
 C                   GOTO      @TAG01
 C                  ENDIF
                                     
This code makes a lot more sense when its rendered in fixed font.  Notice how the various date formats are tested.  If the test fails, it tests a different format looking for one that is valid.  Just code a date test for every format you think the program will encounter.  If all tests fail, its an invalid date.

I warned you . . . this is really old code but it works.  
You can do the same thing in free form RPG and it looks a lot better.]]></description>
		<content:encoded><![CDATA[<p>Here is a sample of code from an old RPG program we still use that accomplishes what you request.  We call it from the CL.  It returns the results to the CL program.<br />
This section of code gives you an idea of how this can be done:</p>
<p> C     *MDY0         TEST (D)                DAT_C6                 51       (*IN51 On if date test failed)<br />
 C                   IF        NOT *IN51                                                     (Date is in MMDDYY format)<br />
 C                  do something here<br />
 C                  GOTO      @TAG01<br />
 C                   ENDIF<br />
  *<br />
 C     *CYMD0        TEST (D)                DAT_C7                 51     (test for CYYMMDD format without separator)<br />
 C                   IF        NOT *IN51                                                     (Date is in CYYMMDD format)<br />
 C                   do something here<br />
 C                   GOTO      @TAG01<br />
 C                   ENDIF                                                 </p>
<p> C     *YMD0         TEST(D)                 DAT_C6                 51     (test of YYMMDD format without separator)<br />
 C                   IF        NOT *IN51                                                   (Date is in YYMMDD format)<br />
 C                  do something here<br />
 C                   GOTO      @TAG01<br />
 C                  ENDIF</p>
<p>This code makes a lot more sense when its rendered in fixed font.  Notice how the various date formats are tested.  If the test fails, it tests a different format looking for one that is valid.  Just code a date test for every format you think the program will encounter.  If all tests fail, its an invalid date.</p>
<p>I warned you . . . this is really old code but it works.<br />
You can do the same thing in free form RPG and it looks a lot better.</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.048 seconds using memcached
Object Caching 281/287 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 04:45:04 -->