Focal Point
[CLOSED] MASTER File

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

April 13, 2015, 03:38 AM
Poryes
[CLOSED] MASTER File
HI -

I want to change my master file field (Data source is FOCUS) from Numeric (I) to alpha numeric (A). There is no change in the length of the field. So there is NO need to REBUILD REORG.

THe same MASTER file is used in many other focexecs too. Will there be any impact if I change the field to Alphanumeric.

WHat do I need to consider before changing the field to Alphanumeric.



Thanks,

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
April 13, 2015, 04:27 AM
Alan B
You cannot change the format of a field from I to A, the internal format is different.


Alan.
WF 7.705/8.007
April 13, 2015, 05:35 AM
Poryes
ok, What should I do to accomplish this?


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
April 13, 2015, 05:39 AM
Tony A
As Alan states, you cannot just change the format. However, you could add a new define column that will achieve the same. Consider this snippet from a version of the CAR.MAS file that I have -

 FIELDNAME=RPM,RPM,I5,$
 DEFINE RPM_A/A5 = FPRINT(RPM, 'I5', 'A5');, $

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 13, 2015, 06:41 PM
Waz
The only other option is to rebuild the FOCUS DB.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 14, 2015, 07:20 AM
Poryes
Hi Waz,

Rebuilding with the master by changing format from I to A?

You mean REBUILD REORG DUMP and REBUILD REORG LOAD?

I have a question here, This change will not impact the other focexecs which uses the same master file?


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
April 14, 2015, 09:04 AM
GavinL
Tony's way is the easiest approach.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
April 14, 2015, 06:19 PM
Waz
Hi Poryes,

Yes to change the field storage, you will have to do a dump and load.

As for impacts, that all depends on how the field is used in the other focexecs.

If there are calcs done, then there will be issues.

It is up to you to determine the best approach, as you can analyse the code.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 14, 2015, 09:45 PM
Alan B
Please read the documentation:
quote:

You can use REBUILD REORG to:
Add new segments as descendants of existing segments.
Remove segments.
Add new data fields as descendants to an existing segment.
Note: The fields must be added after the key fields.
Remove data fields.
Change the order of non-key data fields within a segment. Key fields may not be changed.
Promote fields from unique segments to parent segments.
Demote fields from parent segments to descendant unique segments.
Index different fields.
Increase or decrease the size of an alphanumeric data field.

REBUILD REORG will not enable you to:
Change field format types (alphanumeric to numeric and vice versa, changing numeric format types).
Change the value for SEGNAME attributes.
Change the value for SEGTYPE attributes.
Change field names that are indexed.


A change to format types requires a manual HOLD and RELOAD of all the data.

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
April 15, 2015, 05:06 AM
j.gross
Still, if you want to change the format and retain the original fieldname, and really want to utilize Rebuild, you can do it but it takes several steps.

Rebuild (dump & load), with
master-1, the original
master-2, with a second copy of the field added (under a different name, revised format).

MODIFY FILE to populate the new field

Rebuild (dump & load), with
master-2, as above
master-3, dropping the old field.

Edit master-3, to give the new field the old name

(If the field is indexed, the last step will entail a rebuild)

Make sure the final Master has the original name.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05