Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Read date from HOLD into amper variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Read date from HOLD into amper variable
 Login/Join
 
Platinum Member
posted
Hi

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 you

This message has been edited. Last edited by: Kerry,


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Virtuoso
posted Hide Post
Is your HOLD file in ALPHA format?

See this:

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 139 | Registered: July 21, 2011Report This Post
Virtuoso
posted Hide Post
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?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
You can probably use the HCNVRT (Convert a Date-Time Value to Alphanumeric Format) function...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Read date from HOLD into amper variable

Copyright © 1996-2020 Information Builders