Logical File Question

0 pts.
Tags:
Development
We need to break a date field into mm dd yy so we can key on the mm. how can we do this in a logical file? thanks
ASKED: April 11, 2005  9:53 AM
UPDATED: April 15, 2005  2:36 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Mrs. B,

Can you give us an idea of what tools you have available?

Thanks, :) Gene

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Matobey
    If your the date value in the physical file is truly a date field (data type L) I don't know of a way to get just the month value of the field. The substring keyword won't work with a date field. You could build a work file and process from that or create a date file with the date and then the month, day and year split into individual fields and have a join logical keyed by the date file month. Hope this helps.
    0 pointsBadges:
    report
  • HappyGene
    Hi Mrs. B, Ok, I was wondering if you were using Access over Sql, VB straight to a table via ODBC. Is this Excel, perchance? Xbase? In other words, what software do you use for the data? How you sort on the piece of a field will take a different tack depending on your platform. LMK, :) Gene
    0 pointsBadges:
    report
  • Manojshirgurkar
    Hi, If its in VB you can use Month() function pass a date o it and it will return the month of the date. If you want year or day there are unctions like year() , date(), which will return you a date. and if you dont know if it is a date or note its better that you check it beforing passing it to function, for that you can use isdate() function it will return true of false. Anything more?
    0 pointsBadges:
    report
  • SteveL
    Hi, If the date is an L date-type, you could try adding the separate fields to the physical file, putting a trigger on the physical file to populate the separate fields, and then generate your logical over the separate MM field. Steve
    0 pointsBadges:
    report
  • TheQuigs
    Here's another one to try if your field is a true date datatype. Specify the DATFMT on the field in your logical. The options will include the year also, but it sounds like it should give you what you're after. DATFMT(*MY , *YM , *MYY , *YYM) -- check out the DDS Reference manual in the Information Center. For Version 5, Release 2: http://publib.boulder.ibm.com/infocenter/iseries/v5r2/ic2924/index.htm For Version 5, Release 3: http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm Look for the Reference under +Database and +Manuals
    0 pointsBadges:
    report
  • TheQuigs
    Sorry, I forgot they moved the DDS Reference in V5R3. You can find it under +Programming, and +DDS.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following