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     7.1.6 vs 7.6.4 Problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
7.1.6 vs 7.6.4 Problem
 Login/Join
 
Platinum Member
posted
I've got the following define in WebFOCUS 7.6.4 to translate out a date value (this came from the focal point article "Zulu Time" - Zulu Time).

DEFINE FILE SOC_CLR_AUDITLOG
-*Reformat CH_CREATE_DATE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
TEMP1/A16= SUBSTR(16,EDIT(CH_CREATE_DATE),7,16,16,TEMP1);
TEMP2/D13= EDIT(TEMP1);
GMTBASE/I8YYMD WITH CH_CREATE_DATE = 19700101;
GMTBASE2/YYMD= GMTBASE;
GMTBASE2DTM/HYYMDIA= HDTTM(GMTBASE2,8,'HYYMDIA');
FOCUSDATE/HYYMDIA= HADD(GMTBASE2DTM,'SECONDS',TEMP2,8,'HYYMDIA');
-* You have to adjust this result by your GMT offset.
FOCUSDATE/HYYMDIA= HADD(FOCUSDATE,'HOUR', -4,8,'HYYMDIA');
-* Downloadable form:
CH_CREATE_DT/A20 = HCNVRT(FOCUSDATE,'(HYYMDIA)',20,'A20');
END

When I run this in 7.6.4, with a value of "1152189445" for CH_CREATE_DATE, I get "2006/07/06 8:37AM" for CH_CREATE_DT.

When I run this in 7.1.6, with a value of "1152189445" for CH_CREATE_DATE, I get "1969/12/31 8:00PM" for CH_CREATE_DT.

Since this is same data source, and the same defines, why would this be happening?


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Gold member
posted Hide Post
1969/12/31 is the 0 date.

Here is what I've used for 7.1....

-SET &OFFSETHOURS = 8;
DEFINE FILE CAR
CH_CREATE_DATE/D16 WITH COUNTRY = 1152189445;

OFFSETHOURS/D5.1 WITH COUNTRY = &OFFSETHOURS ;
OFFSETDAYS/D7.5 = IF OFFSETHOURS LT 0 THEN 1+OFFSETHOURS/24 ELSE
OFFSETHOURS/24;
GMTCORRECT/D6.4 = OFFSETDAYS + .00005 ;

-* use this if alpha.....
-*TEMP1/A13 = SUBSTR(32,CH_CREATE_DATE,20,32,13,TEMP1);
-*TEMP2/D13 = EDIT(TEMP1);

TEMP2/D13 = CH_CREATE_DATE;
tMINUTES/I10 = TEMP2/(60*1000) ;
tDAYS/D10.4 = tMINUTES/(60*24);
tDATE/D10.4 = tDAYS + 25567 + GMTCORRECT ;
EXCELDATE/D10.4 = tDATE + 1 ;
GETDATE/I5 = tDATE ;
DAYSHARE/D6.4 = tDATE - GETDATE ;
HOURSHARE/D6.2 = DAYSHARE * 24 ;
HOURS/I2L = HOURSHARE ;
MINUTESSHARE/D6.2 = HOURSHARE - HOURS;
MINUTES/I2L = MINUTESSHARE * 60;
iDATE/I8YYMD = DTYMD(tDATE,iDATE);
CDATE/A14 = EDIT(iDATE)|EDIT(HOURS)|EDIT(MINUTES);
CH_CREATE_DT/HYYMDS = HINPUT(14, CDATE, 8, 'HYYMDS');
END
TABLE FILE CAR
PRINT CH_CREATE_DT
END


WebFocus 7x, 8x, Win / Linux, any output format
 
Posts: 70 | Location: reading, pa | Registered: April 07, 2007Report This Post
Platinum Member
posted Hide Post
Thanks. I'll give this a shot.

Any idea why the defines that work in 7.6.4 would not work in 7.1.6?


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Virtuoso
posted Hide Post
Code tightening.

Do a search of 7.1. on this forum and you'll see lots of discussion on the topic.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
and whats goofier, the article was written on 5.2.8.
I just tried some versions of the 2 examples you all wrote above in 765 and i got gibberish.
I'll research, and update the article, but probably not till after Summit.
-S




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
correction:
i tried this example in 765 and it worked fine
DEFINE FILE CAR
-*TEMP1/A16= SUBSTR(16,EDIT(CH_CREATE_DATE),7,16,16,TEMP1);
-*TEMP2/D13= EDIT(TEMP1); 
TEMP2/D13 WITH COUNTRY= 1152189445 ;
GMTBASE/I8YYMD WITH COUNTRY= 19700101;
GMTBASE2/YYMD= GMTBASE;
GMTBASE2DTM/HYYMDIA= HDTTM(GMTBASE2,8,'HYYMDIA');
FOCUSDATE/HYYMDIA= HADD(GMTBASE2DTM,'SECONDS',TEMP2,8,'HYYMDIA');
-* You have to adjust this result by your GMT offset.
FOCUSDATE/HYYMDIA= HADD(FOCUSDATE,'HOUR', -4,8,'HYYMDIA');
-* Downloadable form:
CH_CREATE_DT/A20 = HCNVRT(FOCUSDATE,'(HYYMDIA)',20,'A20');
END
  
TABLE FILE CAR
PRINT CH_CREATE_DT
END




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
cwm
can we see a dump of eachof your defined variables, 1 by 1, for the 71 execution and for the 76 execution.
That way we can see exactly where the oops is.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
I also thought that since the article was written on 5.2.*, that there would not be a difference between 7.1.6 and 7.6.4.

7.1.6:

CH_CREATE_DATE 1152189445
TEMP1 1152189445
TEMP2 1,152,189,445
GMTBASE 1970/01/01
GMTBASE2 1970/01/01
GMTBASE2DTM 1970/01/01 12:00AM
FOCUSDATE 1969/12/31 8:00PM
CH_CREATE_DT 1969/12/31 8:00PM

7.6.4:

CH_CREATE_DATE 1152189445
TEMP1 1152189445
TEMP2 1,152,189,445
GMTBASE 1970/01/01
GMTBASE2 1970/01/01
GMTBASE2DTM 1970/01/01 12:00AM
FOCUSDATE 2006/07/06 8:37AM
CH_CREATE_DT 2006/07/06 8:37AM


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Guru
posted Hide Post
One "code tighting" that happenned somewhere between v 5.2.1 and 7.1.3 was in HADD:

The argument "MILLISECONDS" has to be "MILLISECOND". That one took me a while to figure out in our last upgrade. I remember someone else pointed this out also not too long ago.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Platinum Member
posted Hide Post
quote:
The argument "MILLISECONDS" has to be "MILLISECOND". That one took me a while to figure out in our last upgrade. I remember someone else pointed this out also not too long ago.


Oh, jeez. That worked.

I don't think I ever would have figured out that one.


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report 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     7.1.6 vs 7.6.4 Problem

Copyright © 1996-2020 Information Builders