As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have a HOLD file which has a date field in format HMTDYYS which comes up as something like October 17 2011 07:42:00.
I am trying to read this into amper variable. How can I do this? I am able to read normal text fields but its not working for this date field. I am getting everything as numbers.
Thank youThis message has been edited. Last edited by: Kerry,
DEFINE FILE CAR
THEDATE/HMTDYYS WITH CAR = HGETC(8, THEDATE);
END
TABLE FILE CAR
PRINT THEDATE
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS MYDATE FORMAT ALPHA
END
-RUN
-READFILE MYDATE
-TYPE Date/Time => &THEDATE
My hold file is in Alpha format but the Date field is in HMTDYYS format.
This works well though. Thank you.
quote:
Originally posted by njsden: Is your HOLD file in ALPHA format?
See this:
DEFINE FILE CAR
THEDATE/A30 WITH CAR = 'October 17 2001 07:42:00';
END
TABLE FILE CAR
PRINT THEDATE
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS MYDATE FORMAT ALPHA
END
-RUN
-READFILE MYDATE
-TYPE Date/Time => &THEDATE
Please check my adjusted code above. I am creating an HMTDYYS field in a HOLD ALPHA file. I then -READ it in Dialogue Manager and the value (text representation) is being rendered. Isn't this what you need?
That's not really a HMTDYYS, it's an alpha field that contains a Date-Time value.
Unfortunately, when you HOLD a formatted Date or Date-Time field, with -READ you will not retrieve what you expect.
Here's a simple test, the MTRDYY formatted DATE2 field data is held as "04232011":
SET HOLDLIST=PRINTONLY
DEFINE FILE CAR
DATE1/YYMD = '2011/04/23';
DATE2/MTRDYY = DATE1;
END
TABLE FILE CAR
SUM
DATE2
COUNTRY
BY COUNTRY
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN
-READ H001 &ZCTRY1.A10. &ZDATE2.A8. &ZCTRY2.A10.
-? &Z
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
What you haven't specified is what you're planning to do with that Date/time value as eventually you'll have to make it an alphanumeric value anyway to pass it from Dialogue Manager to FOCUS for processing.
Following up on Francis comment, you will probably need to use:
1) HINPUT to make the alpha value you read from the HOLD file an "internal" Date/time value (which you cannot really display as Dialogue Manager has no "native" support for it) but will allow to perform date/time operations on it (see point 2)
2) HADD or any other Date/time function to operate on the value you just converted to date/time and do "something" on it
3) HCNVRT to take that modified date/time value and make it an alphanumeric value again that can now be used when its &variable gets rendered to FOCUS ...
Sorry, maybe I'm just lost here because I have no idea of what you're trying to achieve.