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     [solved]Date woes....

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved]Date woes....
 Login/Join
 
Platinum Member
posted
I have two reports that use dates as parameters the first one works and is coded as follows
 
-SET &DAYLIM2=AYMD(&YYMD,+2,'I8YYMD');
-SET &DAYLIM1=AYMD(&YYMD,+1,'I8YYMD');

 


In the second one the user will select the date from an HTML page using a calendar control and the second parameter is derived from the first one. The code with the error message is below

 
-DEFAULTH DAYLIM1=&YYMD;
-SET DAYLIM2=AYMD(2017/08/07,+1,'I8YYMD');
0 ERROR AT OR NEAR LINE      6  IN PROCEDURE RoomCardsFOCEXEC *
(FOC36355) INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION AYMD
 

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


WF8
Windows
 
Posts: 117 | Registered: May 28, 2015Report This Post
Virtuoso
posted Hide Post
Hi Trudy

I think you need to edit the parameter coming in t strip off the '/'.

-SET &DAYLIMX = EDIT(&DAYLIM2,'9999$99$99');

Then do your calculation on &DAYLIMX


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Expert
posted Hide Post
&YYMD.EVAL , +2 , 'I8'
its the .EVAL you need
'I8' works
'I8YYMD' works

in your 2nd example.
-DEFAULT &DAYLIM = &YYMD.EVAL ;
but it seems that your inbound value has /,
whereas &YYMD doesn't
so either change your default setting
-DEFAULT &DAYLIM = &DATEYYMD.EVAL ;
or change your inbound parms to be numeric, w/o the /
(as chuck says)




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
Master
posted Hide Post
On a side note, I noticed the following on the first line of the report output you posted with the error:
 -DEFAULTH DAYLIM1=&YYMD; 
Just so that you are aware, unfortunately you cannot use variables in a -DEFAULT or -DEFAULTH

EDIT: You can use a variable on a -DEFAULTH if you include a .EVAL at the end of the parameter. When running the following code:
-DEFAULT &TODAY_YYMD1 = &DATEYYMD.EVAL;
-DEFAULTH &TODAY_YYMD2 = &DATEYYMD;
-DEFAULTH &TODAY_YYMD3 = &DATEYYMD.EVAL;

-TYPE DEFAULT: &TODAY_YYMD1
-TYPE DEFAULTH: &TODAY_YYMD2
-TYPE DEFAULTH.EVAL: &TODAY_YYMD3 


I get the following output:
DEFAULT: &DATEYYMD.EVAL
DEFAULTH: &DATEYYMD
DEFAULTH.EVAL: 2017/08/29 

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


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report 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     [solved]Date woes....

Copyright © 1996-2020 Information Builders