× 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.



Booth Martin wrote:

I've done that Tom. (Its probably all I needed to do. As I said, I suspect I am making this too complicated.) What is worrying me is if ThisSysytem uses a default of *ISO and ThatSystem uses a default of *USA, will I be in trouble running my CL on the other system?

Did you try with various job settings for CHGJOB DATFMT() to see if there were differences? Note that CVTDAT allows FROMFMT(*JOB) and FROMFMT(*SYSVAL). That means that it can adapt depending on job or system settings. You don't necessarily need to know what format is in effect.

Now, if you're being fed from some source that isn't _telling_ you what the format is, you're on your own no matter what. For example, if your program is called and is passed a parm variable with a 'date' in it and there's no other parm to tell you the format, I imagine you're needing to code some definite date intelligence in there. That's no much different from being passed a variable length value without a hint of how long the value is.

Tom Liotta

Tom Liotta wrote:
Booth Martin wrote:

This is not how I understand it, but obviously I am no expert on this topic.

Part of the problem that I face is that I do not know ahead of time what the *SYS or *JOB values will be.

Jeff Crosby wrote:
But when you define it as a field in the file, don't you have to specify a
date format, with *ISO being the default?  And this is what tells DB2 (or
DB400 or whatever the proper 'database' name is for i5) how to format it for
presentation in HLL or diaplays or whatnot?
Booth:

When you access the value in CL, it should already be formatted appropriately. Simplest way to see what the value looks like is to run DMPCLPGM just before CVTDAT.

If you run the program with a couple different date/format job settings, you should see exactly how it works through comparing the dumped values.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.