0 pts.
 cl/400
Hi, Good morning my experts.Im kuppi.im working as a software trainee on AS/400 technology.i have also joined with ibmi5 team.im trying to convert date with cl/400 coding.I have taken 2 parameters(like date and date types). A. If suppose date type is j,Now i want to convert date to *MDY format B. if date type is M,now i want to convert date to *JUL format C. sending a Program message with the value of converted date.

Software/Hardware used:
ASKED: July 31, 2008  5:37 AM
UPDATED: March 27, 2011  4:29 AM

Answer Wiki:
Hi, You should be able to use CVTDAT command for this. Regards, Martin Gilbert.
Last Wiki Answer Submitted:  July 31, 2008  9:00 am  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

A. If suppose date type is j,…

There is no such date type as “j”.

B. if date type is M,…

There is no such date type as “M”.

In order to answer questions, we need to know what you are asking. Please describe what you mean by date types “j” and “M”.

Someone might think that “j” means *JUL, *JOB or *JIS (or possibly even *LONGJUL). It is probable the “M” is *MDY.

But it’s also possible that you mean something entirely different and anyone who answers will lose a lot of time even if the answer contains accurate information.

Tom

 108,280 pts.

 

Are you refering to edit codes “J” and “M”?
If so, edit codes are a way to show data to the user in a readable format. Edit codes do not changed the data in the field itself.
That said, there are a couple of built-in functions that apply edit codes to a field and place the results in a new field. Check out %EDITC and %EDITW. I would not be surprised to learn that these BIF’s can be used to replace the data in the original field but proceed with care if you decide to do so.

 5,525 pts.

 

Check out %EDITC and %EDITW.

Note that those can’t be used in CL, and they don’t help with CVTDAT.

However, if the programming is done in RPG, they are very useful functions.

Tom

 108,280 pts.

 

Like Tom, I’m not too sure of what you are asking. But if it’s edit code or edit word capability you might want to check out the freeware Edit Decimal Variable command provided in the no-charge base option of eXtreme CL.

Start of vendor response.

If you’re interested in date representation changes, then in addition to the Convert Date command provided with the i operating system, you may be interested in the Change Date Variable command of the eXtreme CL Date and Time category of CL commands. This category however does currently have a one time charge of $19.95.

End vendor response

Bruce Vining

 6,055 pts.

 

You should be able to use CVTDAT command for this.
Berita Aladiw | Belajar Aladiw

 0 pts.