× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Gary,

There is probably an easier way to do what you want to do and probably with far fewer lines of code... Check out this V5R3 article from 2008 which may help.

http://www.mcpressonline.com/programming/rpg/rpg-iv-legacy-dates-cheat-sheet.html

Sam

On 1/5/2015 7:17 PM, Gary Kuznitz wrote:
I can't seem to figure out how to reformat a date to get it in *USA format.

The error I'm getting is:
*RNF7606 20 2000004 The Data-Format entry is A or N but field DTEOFHIRE is
not of type character or indicator.

D DTEOFHIRE 10D INZ DatFmt(*USA)

O DTEOFHIRE

DDS:
A DTEOFHIRE L TEXT('Employment Date')
A COLHDG('Employment' +
A 'Date' )

I'm running this on V5R3.

It could easily be I haven't loaded DTEOFHIRE correctly.
I read in Emplydate. EmpMonth is a 3 char Month Jan, Feb

D DS
D Emplydate
D EmpDay 2 0 Overlay(Emplydate:1)
D EmpMonth 3 Overlay(Emplydate:4)
D EmpYear 2 0 Overlay(Emplydate:8)
D DS
D Empdate2 10A
D EmpCentury 2 0 INZ(20)
D EmpYear2 2 0 Overlay(Empdate2:3)
D EmpMonth2 2 Overlay(Empdate2:6)
D EmpDay2 2 0 Overlay(Empdate2:9)

I do a lookup on a table to get the month
C Z-ADD 1 X 2 0
C EmpMonth LookUp Months(X) 31
C Move Empdate2 DTEOFHIRE

I have tried many different approaches including adding slashes to Empdate2 and
changing Empdate2 from *Char. I don't know what I must be doing wrong even though
there must be 20 different ways this can be done.

Thanks,

Gary


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.