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 am trying to convert TOD to AM PM time. When when I use some -SET commands in my procedure I get an error message. Following are the commands I am issuing but I am getting error message. Where in procedure do I use these SET commands?
-SET &HOUR = EDIT(&TOD,'99');
-SET &M = IF &HOUR GE 12 THEN ' PM' ELSE ' AM';
-SET &HOUR = IF &HOUR GE 13 THEN &HOUR-12 ELSE IF &HOUR EQ 0 THEN 12 ELSE &HOUR;
-SET &TimeHH = &HOUR | &M ;
-SET &TimeHHMM = &HOUR | EDIT(&TOD,'$$$:99') | &M ;
-SET &TimeHHMMSS = &HOUR | EDIT(&TOD,'$$$:99$:99') | &M ;
This message has been edited. Last edited by: Kerry,
You'll need to be more specific. How about adding the following line just before that piece of code in order to do some basic debugging:
-SET &ECHO=ALL;
After running it, you'll be able to analyze what Dialog Manager is doing and what values your &variables have along the way.
quote:
Plus I want to use this Time in my report fotter.
Just add a reference to your &variable in the FOOTING; you'd probably want to add a spot marker just in case you want to apply specific styling to that value.
TABLE FILE blah
SUM
blah
FOOTING
"Report Run Time:<+0>&TimeHHMMSS"
..
ON TABLE SET STYLE *
TYPE=FOOTING, LINE=1, ITEM=2, STYLE=BOLD, $
ENDSTYLE
END
Thanks for helping. I think I just dont know what I am doing. Here is what I was doing and failing. So how can I use these SET commands in my code? TABLE FILE CAR PRINT 'CAR.ORIGIN.COUNTRY' 'CAR.COMP.CAR' HEADING "" FOOTING "&TimeHHMMSS" -SET &HOUR = EDIT(&TOD,'99'); -SET &M = IF &HOUR GE 12 THEN ' PM' ELSE ' AM'; -SET &HOUR = IF &HOUR GE 13 THEN &HOUR-12 ELSE IF &HOUR EQ 0 THEN 12 ELSE &HOUR; -SET &TimeHH = &HOUR | &M ; -SET &TimeHHMM = &HOUR | EDIT(&TOD,'$$$:99') | &M ; -SET &TimeHHMMSS = &HOUR | EDIT(&TOD,'$$$:99$:99') | &M ; ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON
Okay when I run this as an ad HOC PRocedure it works but it doesnt with when I run it using dev studio. is it related to Dev studio?
-SET &TESTTIME = &TOD ;
-* USE THE NEXT LINE AT THE END OF YOUR PROCEDURE FOR TIME STAMPING
-SET &HOURX = EDIT(&TESTTIME,'99') ;
-SET &HOUR = IF &HOURX GT 12 THEN &HOURX - 12 ELSE &HOURX ;
-SET &HOUR = IF &HOUR LT '10' THEN &HOUR ELSE &HOUR ;
-SET &MIN = EDIT(&TESTTIME,'$$$99') ;
-SET &RPTTIME = IF &HOURX LT '12' THEN &HOUR ||':'|| &MIN | ' AM'
- ELSE &HOUR ||':'|| &MIN | ' PM' ;
-SET &TIMECHK = EDIT(&RPTTIME,'$9') ;
-SET &RPTTIME = IF &TIMECHK EQ ':' THEN '0' || &RPTTIME ELSE &RPTTIME ;
-SET &RPT_START_TIME = HHMMSS(&TOD);
TABLE FILE CAR
PRINT
*
BY CAR
FOOTING
"&RPT_START_TIME "
WHERE READLIMIT EQ 25
ON TABLE SET PAGE-NUM OFF
END
I know you solved your issue but you might want to look at this. You can do the timestamp in one line.
-* get the current data and time and format into a string of formatted as "Prepared on 01/29/2007 10:33:12AM" -* save the current datetime into variable &NOW -SET &NOW = 'Prepared on ' | HCNVRT(HGETC(8,'HMDYYm'),'(HMDYYSA)',30,'A30');
Then just put the &NOW in your footer. I got the HCNVRT code from a generous person on this forum.