Hello, one of my fields in the database is in P24.7 format.I am doing a -READ on that field.
TABLE FILE STAGE
PROB AS 'V9'
WHERE KEY EQ '&SALES';
ON TABLE HOLD AS HEAD FORMAT ALPHA
-READ HEAD &V9.A30.
-SET &A_PROB = EDIT(&V9,'99999999999999999999999999999999');
-SET &MY_PROB = TRUNCATE(&A_PROB);
-SET &MY_PROB1 = &MY_PROB * 100;
The field I am talking about is PROB. I tried using -READ HEAD &V9.P24.7.,but that does'nt work. Can somebody correct me. Thanks Swetha.This message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.7 windows Html,Pdf and Excel
December 01, 2010, 03:50 PM
December 01, 2010, 04:10 PM
if you are not sure about the exact length of the field you can put a HOLD command
? HOLD HEAD
start the report with
and then you will see what length your field is (I suppose it is A24)
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
December 01, 2010, 04:21 PM
Actually you should have a -RUN after the END from the TABLE FILE.
Also you are READING 30 characters from the file, as the field, and the file will only be 24 bytes, this will also cause problems.
Change the -READ to .A24.
If you want to know how many bytes are in the record, change the HOLD to SAVE.
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 01, 2010, 08:03 PM
If you want to retain decimal places in calculations made in Dialogue Manager, you will need to set DMPRECISION to an appropriate number of decimal places (ex.: SET DMPRECISION = 7). Otherwise DM will truncate the decimals and display calculated variables as integers.
December 02, 2010, 04:28 AM
Just my 2penneth...
I always add -RUN after :
the Hold file after -READ
this can resolve many problems - I dont have any p24 data to hand to test.
TABLE FILE STAGE PRINT PROB AS 'V9' WHERE KEY EQ '&SALES'; ON TABLE HOLD AS HEAD FORMAT ALPHA END