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.
Remember that EDIT has 2 abilities. One is to do simple substring and the other is to convert an alpha string to integer. The latter makes no sense in DM as variables are numbers by default.
You can use EDIT in DM to do substringing as L_G is actually trying to do. Do what Glenda has suggested by removing the format only put a dash (-) in front of the SET.
Jimster has the answer (and Glenda the solution.) Here's the explanation: &vars referenced in the -SET statements don't really know that they are alpha or numeric. I know there are lots of different syntax used to make it appear that way (like the .A8.) and i'm sure there are exceptions (like dates) but for the most part, you can use them interchangeably in numeric or string functions AS LONG AS THE VALUE MATCHES THE FUNCTION'S SYNTAX.
If you tell WF to use an &var as a string (like in your example with an EDIT mask) it will. If you tell it to add one (-SET &SDTIN=&SDTIN + 1; ) it will (if the value contains no alpha characters.) No need to specify the format, and as you saw, it throws an error if you try that.
For example, if &VAR1 is equal to 12345, in a WHERE (or DEFINE or -SET) you could use WHERE FIELDNAME EQ &VAR1 or WHERE FIELDNAME EQ '&VAR1' but if the value were 'Some Value' you would get an error with the first example.
Long answer to a short question, but I hope that helps.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007