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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Format a number from a hold file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Format a number from a hold file
 Login/Join
 
Platinum Member
posted
I have a PRINT field that I convert from a D20.2 to an I3 that gets put in a hold file, XFOCUS or FOCUS format. When I use the field as a BY field from the hold file the formatting reverts back to its original D20.2 and I can't seem to reformat it. Any idea how to go about this and why this is happening?

 
PRINT
HIGH_SCHOOL_RANK/I3
....
ON TABLE HOLD AS INITHLD FORMAT XFOCUS INDEX 'PIDM_KEY'
....
JOIN.....

BY HIGH_SCHOOL_RANK AS 'HS Rank'
 


Thanks

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


WF8
Windows
 
Posts: 117 | Registered: May 28, 2015Report This Post
Virtuoso
posted Hide Post
Look at this
TABLE FILE CAR
BY COUNTRY/A50V
ON TABLE HOLD AS TMP FORMAT FOCUS
END


It result in that
FILENAME=TMP, SUFFIX=FOC     ,
 DATASET=tmp.foc, $
  SEGMENT=SEG01, SEGTYPE=S0, $
    FIELDNAME=COUNTRY, ALIAS=E01, USAGE=A50V,
      TITLE='COUNTRY', $
    FIELDNAME=COUNTRY, ALIAS=E02, USAGE=A10, $


Then this
TABLE FILE CAR
BY COUNTRY/A50V AS 'N_COUNTRY'
ON TABLE HOLD AS TMP FORMAT FOCUS
END


Result in that
FILENAME=TMP, SUFFIX=FOC     ,
 DATASET=tmp.foc, $
  SEGMENT=SEG01, SEGTYPE=S0, $
    FIELDNAME=N_COUNTRY, ALIAS=E01, USAGE=A50V,
      TITLE='N_COUNTRY', $
    FIELDNAME=COUNTRY, ALIAS=E02, USAGE=A10, $


Since you have not renamed the redefined field, you have twice the same field name in your master file and it seems that it's the old one that is used in your subsequent TABLE FILE


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
TABLE FILE CAR
BY COUNTRY/A50V
ON TABLE HOLD AS TMP FORMAT FOCUS
END
-RUN
?FF TMP
-EXIT

Results:

FILENAME= TMP
COUNTRY E01 A50V
COUNTRY E02 A10

So, Add:
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
BY COUNTRY/A50V
ON TABLE HOLD AS TMP FORMAT FOCUS
END
-RUN
?FF TMP
-EXIT

Results:

FILENAME= TMP
COUNTRY E01 A50V


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Tom Flynn:

So, Add:
SET HOLDLIST=PRINTONLY


Also another option as usual in WF

Good One


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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]Format a number from a hold file

Copyright © 1996-2020 Information Builders