Q
Problem solve Get help with specific problems with your technologies, process and projects.

Working with dates in RPGIV

In RPGIV, I have a subfile with a primary sort with dates in the second column. Some of these dates are current days dates and some are dates in the future. In the third column of the subfile, I have been requested to display the day (i.e. Mon, Tue,...) associated with the date in the second column. What would be the best way to approach this? (With all of the date functions IBM has to offer within an RPGLE pgm I am surprised they fell short on this, or has a built-in function been created. I would even be happy with a numeric return value associated with a day of the week.

It is a simple routine to write, but IBM left it out of the special opcodes. There are two code examples in the forums under the post .AMBHatAawDb.1@.ee84633>#287 in the Search400.com forum. Either will work for you.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Dig Deeper on iSeries COBOL programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close