Focal Point
[Solved]A Quick question on renaming SEGMENT name in FOCUS file created

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2527082196

May 03, 2019, 11:45 AM
srajeevan
[Solved]A Quick question on renaming SEGMENT name in FOCUS file created
Hi,

I have created a FOCUS file and by default it gets the SEGMENT name as SEG01.Is there any way i can change the name of the SEGEMENT to another name.
I tried to open the file and in the properties i tried to change,but when is try to see the sample data it gives the error message "(FOC209) DATA VALUE EXCEEDS ITS LENGTH SPECIFICATION:"

Any help is highly appreciated.

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


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
May 03, 2019, 01:08 PM
MartinY
Please share your master file (don't forget to use the code tag).


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
May 03, 2019, 01:12 PM
BabakNYC
Are you using HOLD FORMAT FOCUS to create this file or are you using MODIFY to load it? If it's the latter, change the segname before you load.


WebFOCUS 8206, Unix, Windows
May 03, 2019, 01:50 PM
srajeevan
The real scenario is :
I have an excel file which i loaded and created a master file.For some security reasons,i am told not to use the excel file and create .mas.So i am trying to load it into FOCUS file using ON TABLE HOLD AS NAME FORMAT FOCUS as it is only few records.
This is what i do.
  
TABLE FILE DIM_POP_SUMMARY
PRINT 
*
ON TABLE HOLD AS DEMOFOCUS FORMAT FOCUS
END


DIM_POP_SUMMARY is the .mas file i created form excel.
Here is the .mas file created
 
FILENAME=DIM_POP_SUMMARY, SUFFIX=FOC     ,
 DATASET=hub/dim_pop_summary.foc, $
  SEGMENT=SEG01, SEGTYPE=S1,
    DESCRIPTION='POPULATION', $
    FIELDNAME=FOCLIST, ALIAS=E01, USAGE=I5, $
    FIELDNAME=YEAR1, ALIAS=E02, USAGE=I7,
      MISSING=ON,
      TITLE='YEAR',
      PROPERTY=MEASURE,  $
    FIELDNAME=POPULATION, ALIAS=E03, USAGE=I9,
      MISSING=ON,
      TITLE='POPULATION',
      PROPERTY=MEASURE,  $
    FIELDNAME=CITY_NAME, ALIAS=E04, USAGE=A19V,
      MISSING=ON,
      TITLE='CITY_NAME', $
 

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


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
May 03, 2019, 02:18 PM
BabakNYC
ON TABLE HOLD FORMAT FOCUS effectively does this:
ON TABLE HOLD
.
.
.
MODIFY FILE DEMOFOCUS
FIXFORM FROM HOLD
DATA ON HOLD
END
  


You can do this yourself. The first time you create the FOCUS file, after changing the SEGNAME to whatever you want issue a CREATE FILE DEMOFOCUS. That'll create an empty FOCUS file with the SEGNAME=whatever. Then create the HOLD FILE without FORMAT FOCUS, -RUN and then do the MODIFY like I show above. See what happens.


WebFOCUS 8206, Unix, Windows
May 06, 2019, 10:47 AM
srajeevan
Thanks BabakNYC.
I will try your solution.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL