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     comparing date column with CURRENT DATE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
comparing date column with CURRENT DATE
 Login/Join
 
Member
posted
i have a following requirement

i am reading some records using ON TABLE SAVE AS...

i want to read a date column and compare with current date.

can any one help me in doing this?
 
Posts: 23 | Registered: April 20, 2007Report This Post
Platinum Member
posted Hide Post
Kummy :
I apologize if I am missing something here, but I wonder how you can READ using the SAVE AS statement.

If you could, please post the integral pieces of your code that you need help with.
Assuming you are comparing YYMD format dates, here is a high level example -


-SET &TDY=EDIT(&YYMD,'99999999');
-READ HLDFL1 &DT1.A8YYMD
-IF &TDY EQ &DT1 THEN GOTO LBLXX;
-GOTO LBLYY;
-*


Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
 
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Bluezone,

Following is the sample code i have pasted here.i am using oracle as back end. i have used DATE dtatype for my DATECOLUMN.


TABLE FILE XYZTABLE
PRINT DATECOLUMN
WHERE CONDITION EQ 'X'
ON TABLE SAVE AS 'TESTDATA'
END
-RUN


-CONTREAD
-READ TESTDATA &DATECOL.A8
-IF &IORETURN NE 0 THEN GOTO ENDIT ELSE GOTO BUILDTEXT;
-BUILDTEXT
-*IF &DATE EQ &DATECOL THEN GOTO DISP ELSE GOTO ENDIT;
-DISP
-TYPE &DATE
-TYPE &DATECOL

-ENDIT
-EXIT
 
Posts: 23 | Registered: April 20, 2007Report This Post
Virtuoso
posted Hide Post
Exactly what are you trying to do with this code? See if any colums match the current date? It seems to me as if a simple table request with a comparison of the date to current date would work for you. Of course I'm sure you have other data in your file. If no records match you could then use dialog manager commands to check the number of lines generated. Or am I completely missing something here.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Member
posted Hide Post
leah,

Thats a sample code.

its not the actual code i am going to use in my program.

any how thanks for the help. I used the following code to compare

-SET &BEG_DATE = EDIT(&BEG_DATE, '$$$$99$$') | '/' | EDIT(&BEG_DATE, '$$$$$$99') | '/' | EDIT(&BEG_DATE, '9999$$$$');
-IF &DATEMDYY EQ &BEG_DATE THEN GOTO DISP ELSE GOTO ENDIT;
 
Posts: 23 | Registered: April 20, 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     comparing date column with CURRENT DATE

Copyright © 1996-2020 Information Builders