OpenEdge 4GL Unknown Value and the LITERAL-QUESTION Attribute
Sometimes a cigar is just a cigar, and sometimes a question mark is just a question mark.
You frequently need to assign character values to a buffer-field. Sometimes that value may be a question mark.
bh:BUFFER-FIELD(’c1′):BUFFER-VALUE = ‘?’.
When you query the buffer-value, Progress reports that the value is unknown.
MESSAGE
bh:BUFFER-FIELD(’c1′):BUFFER-VALUE = ‘?’
bh:BUFFER-FIELD(’c1′):BUFFER-VALUE = ?
VIEW-AS ALERT-BOX.
If this behavior is not what you intended or you need to keep the Unknown Value distinct for a “?” character, then you have a bug in your program.
How do you get Progress to treat the “?” appropriately? The trick is the LITERAL-QUESTION attribute.
When LITERAL-QUESTION = FALSE, “?” and ? will both evaluate to the unknown value.
When LITERAL-QUESTION = TRUE, “?” is a question mark, and ? is the unknown value.
bh:BUFFER-FIELD(’c1′):LITERAL-QUESTION = TRUE.
bh:BUFFER-FIELD(’c1′):BUFFER-VALUE = ‘?’.
MESSAGE bh:BUFFER-FIELD(’c1′):BUFFER-VALUE = ‘?’ VIEW-AS ALERT-BOX.
Sadly, there is no single-step way to make it always be true for all fields in a temp-table, but something like this may work for you:
FUNCTION SetLiteralQuestion RETURNS LOGICAL
( INPUT bh AS HANDLE ):
DEFINE VARIABLE i AS INTEGER NO-UNDO.
IF NOT VALID-HANDLE(bh) THEN RETURN FALSE.
IF bh:TYPE EQ ‘TEMP-TABLE’:U THEN bh = bh:DEFAULT-BUFFER-
HANDLE.
IF bh:TYPE NE ‘BUFFER’:U THEN RETURN FALSE.
DO i = bh:NUM-FIELDS TO 1 BY -1:
bh:BUFFER-FIELD(i):LITERAL-QUESTION = TRUE.
END.
RETURN TRUE.
END FUNCTION. /** SetLiteralQuestion() **/
You can then invoke the SetLiteralQuestion function using either a table-handle or a buffer-handle.
SetLiteralQuestion(TEMP-TABLE ttFoo:HANDLE).
SetLiteralQuestion(bh).
SetLiteralQuestion(INPUT BUFFER customer:HANDLE).
Since this does some looping and other processing, you’ll want to make sure you’re not calling SetLiteralQuestion() in a loop.
A September ‘08 US Progress OpenEdge Technical Event? Your input needed!
Progress has three quick questions to ask you about a potential 1 1/2 day technical event in the US in September ‘08. Here’s the e-mail that some of us have received:
Dear Valued Progress Customer,
Are you planning to attend Exchange 2008 in Paris? If that’s not an option, what are your options? Your feedback is important to us. Please take a moment to complete a brief three-question survey that will help us determine the type and level of technical events we deliver to you in 2008. Click here - http://www.progress.com/cgi-bin/survey.cgi/vote.w?boothId=398
If you are thinking such an event would be worthwhile or want to go on record on what coast you would prefer the event if it were held, click the above link and speak up.
PROGRESS TOOLS for YOUR PROGRESS TOOL BELT
Progress PSDN online: Is the Web Community used by Progress developers worldwide to find answers to technical questions. PSDN Online provides in-depth technical content – including white papers, articles, downloads, live Webinars with Progress experts, and code samples – on all Progress products and technologies.
The PEG: PEG’s mission is to enhance members’ collaborative and technical capabilities by providing autonomous communications, independent Progress oriented technical support, training, mentoring, collaboration and e-learning opportunities to the global Progress Software community.
PSDN Radio: Talking Progress brings you highlights from the floor at the Progress Exchange User Conferences. Throughout Exchange, presentations answer your questions during live interviews with key Progress technologists and users. Sponsored by Progress Software Developers Network (PSDN), all PSDN Radio recordings are available through this link.
PSDN News: PSDN News is a monthly e-mail newsletter highlighting technical content newly added to PSDN Online including product release announcements, technical white papers, articles, code examples, and technical events such as upcoming PSDN Webinars.
PSDN techTALK: Hosted by Marv Stone and Kim Mager, techTALK is a new monthly audio program geared for the technical Progress community. This program is an opportunity for Progress OED (for right now) to provide interesting technical information to both customers/partners and to the Progress technical community at large.
Customer Support: Progress customer support services are designed to provide customers and partners with world-class technical support.
Educational Services: Progress Education Services feature numerous award-winning training programs to provide you detailed instruction and hands-on experience in getting the most out of your Progress Software products. From mastering the fundamentals to learning the latest changes, there are a variety of training formats and courses to let you invest in yourself at your pace and skill level.
On-Demand Webinars: Webinars are development-oriented presentations meant to provide additional technical content to members. Delivered by Progress Development Engineers and Product Managers, each web seminar is one to two hours in length and includes time to take questions from the attendees.
Progress Exchange notes, presentations and more: The one place to stop to find and review past Progress Exchange conferences, notes and presentations.



