FIELDTEXT mystery

Maloney, Charlie Charlie.Maloney@Cognos.com
Tue, 21 Sep 1999 11:11:32 -0400


Hi Nick;

Just adding to the pigpile.

Consult your QDESIGN Procedural Reference manual.  In Chapter
12 of the Version 7 manuals you'll find a VERY detailed 
discussion of the ACCEPT verb and its' ten steps.  

After you memorize this (!), look up the DISPLAY verb later 
in the chapter.  

The DISPLAY verb discussion includes a diagram showing that 
it performs steps 8, 9 and 10 of the ACCEPT verb cycle (VMS 
doc is wrong - indicating only steps 9 and 10).  Looking back 
at the ACCEPT verb discussion, you'll see that step 8 moves 
the contents of whatever you're displaying into FIELDTEXT.  

Remember that the EDIT procedure (step 5) is there so that 
you can write complex or conditional data validation that 
you're unable to do non-procedurally with FIELD statement 
options.

Step 6 stores the validated data item in the record buffer.

The PROCESS procedure (step 7) is there so that you can 
perform spin-off processing on a fully validated data item 
after all the non-procedural and procedural edits in steps 
1 through 5 of the ACCEPT verb cycle are finished.  

As Ron, Frank and Blue have suggested, the best place for 
your logic is probably the PROCESS procedure.  

By the way, there's a three-day discussion of this and other 
procedural concepts in the Advanced PowerHouse course.  Well 
worth the time I think.

Charlie Maloney
Technical Account Manager
Charlie.Maloney@cognos.com
PH:  781 313 2305
FX:  781 229 6426


-----Original Message-----
From: Nick Tippler [mailto:NT204@cus.cam.ac.uk]
Sent: Tuesday, September 21, 1999 4:40 PM
To: powerh-l@lists.swau.edu
Subject: FIELDTEXT mystery


Afternoon All

I have a procedure which tests the value of FIELDTEXT for one field, and
changes the contents of a second field, based on the given value.
However, somewhere after EDIT and before OUTPUT, the FIELDTEXT for the
first field assumes the ASCII(value) of the second field:

PROCEDURE EDIT     FIELD_1
BEGIN
    IF         FIELDTEXT = "E"
          THEN LET FIELD_2 = 2
       ELSE IF FIELDTEXT = "O"
          THEN LET FIELD_2 = 1
       ELSE IF FIELDTEXT = "C"
          THEN LET FIELD_2 = 6
   DISPLAY FIELD_2
END

Any idea how I can stop this?

Regards
 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ Nick Tippler                                  nt204@cam.ac.uk
+ Registrar, Faculty of Education,          tel +44 1223 507145
+            University of Cambridge,       fax +44 1223 507140
+            Homerton College,
+            Cambridge CB2 2PH
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.