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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Mainframe FOCUS - Modify/Update

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Mainframe FOCUS - Modify/Update
 Login/Join
 
Gold member
posted
2 questions


1. - Whe saying
USE 
 MYDATABASE FOCUS A NEW
END

what does the the keyword "NEW" do?
Does it create a completly new FOCUS table?
do i need to have a MASTER file already made to do this?

2. I'm trying to update a database via a alpha data file, which has a new field. I added taht field to my FOCUS table MASTER. however now i keep getting an error saying :

>                                                                   
(FOC322) FILE DESCRIPTION CHANGED AFTER DATA ENTERED (FILE/SEGMENT) 
MYDATABSE                                                             
                                       
>                                                                   


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode
 
Posts: 74 | Location: Gaithersburg, MD | Registered: August 08, 2006Report This Post
Gold member
posted Hide Post
USE
dbname NEW
END

> Is for Databases that don't exist yet, and you will create during the session with a DYNAM to allocate to it, and a CREATE FILE to write-out a new FOCUS file. For what you are doing now, I don't think you will need USE.

> What you are doing is creating a new field to an existing database. To do this, you have 2 ways to add the field correctly. 1) You can use a TABLE/HOLD using the old MASTER (MFD), and MODIFY FILE new MFD - FIXFORM from HOLD etc. 2) You can use the REBUILD Utility - just enter: REBUILD. You want to first DUMP the old file without any MFD changes. Then edit the MFD and add the new field (or do a copy/rename of the old/new MFD), then: REBUILD LOAD.

Either way, once you load, the new FOCUS file will have the new field. Whether you supply a value for it during the reload or REBUILD is up to you and your application.

Hope this helps. Jim


WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
 
Posts: 77 | Location: Baltimore | Registered: May 31, 2006Report This Post
Silver Member
posted Hide Post
1) NEW Indicates that the data source has yet to be created.

2) I've had issues with REBUILD so I do it the tried and tested way...... Not that easy I'm afraid, you can sometimes get away with adding a field to end of a particular segment -
but it is not recommended (so long as it does not exceed the 4K page limit).

i) You could dump each segment of the data into 1 hold file per segment making sure the hold files are
permanently catalogued (just in case something goes wrong)

ii) Then change your master file desciption.

iii) issue your use

iv) issue your create file statement

v) Reload the data segment by segment

-------------------------------------------
So for example if your master looks like:

FILE=MYFILE, SUFFIX=FOC
SEGNAME=ROOT_SEG, SEGTYPE=S2, $
FIELD=FIELD1, ALIAS=FIELD1, FORMAT=A8, INDEX=I, $
FIELD=FIELD2, ALIAS=FIELD2, FORMAT=A20 , $
FIELD=FIELD3, ALIAS=FIELD3, FORMAT=I3 , $
$
SEGNAME=CHILD1, SEGTYPE=S1, PARENT=ROOT_SEG, $
FIELD=FIELD4, ALIAS=FIELD4, FORMAT=I9, INDEX=I, $
FIELD=FIELD5, ALIAS=FIELD5, FORMAT=A9, INDEX=I, $
$
SEGNAME=CHILD2, SEGTYPE=S1, PARENT=CHILD1, $
FIELD=FIELD6, ALIAS=FIELD6, FORMAT=I5, INDEX=I, $
FIELD=FIELD7, ALIAS=FIELD7, FORMAT=A5, INDEX=I, $

-*********************************************************
-* FEX TO DUMP DATA SEG BY SEG
-* NOTE THE 'BY' SEQUENCES ECHO THE KEYS IUN THE DATABASE
-* SO TO FULLY QUALIFY THE CONTENTS OF FIELD7
-* YOU NEED TO KNOW FIELD1 & FIELD2 (S2 SEG)
-* YOU NEED TO KNOW FIELD4 (S1 SEG)
-* YOU NEED TO KNOW FIELD6 (S1 SEG)
-*********************************************************
FILEDEF DUMPSEG01 DISK &APPROOT..\MYAPP\DUMPSEG01.FTM
FILEDEF DUMPSEG02 DISK &APPROOT..\MYAPP\DUMPSEG02.FTM
FILEDEF DUMPSEG03 DISK &APPROOT..\MYAPP\DUMPSEG03.FTM

TABLE FILE MYFILE
PRINT FIELD3
BY FIELD1
BY FIELD2
ON TABLE HOLD AS DUMPSEG01 FORMAT ALPHA
END

TABLE FILE MYFILE
PRINT FIELD5
BY FIELD1
BY FIELD2
BY FIELD4
ON TABLE HOLD AS DUMPSEG02 FORMAT ALPHA
END

TABLE FILE MYFILE
PRINT FIELD7
BY FIELD1
BY FIELD2
BY FIELD4
BY FIELD6
ON TABLE HOLD AS DUMPSEG03 FORMAT ALPHA
END

DOS COPY DUMPSEG*.MAS &APPROOT..\MYAPP\DUMPSEG.MAS

-**********************************************************
-* NOW CREATE YOU NEW MASTER FILE
-**********************************************************
FILE=MYFILE, SUFFIX=FOC
SEGNAME=ROOT_SEG, SEGTYPE=S2, $
FIELD=FIELD1, ALIAS=FIELD1, FORMAT=A8, INDEX=I, $
FIELD=FIELD2, ALIAS=FIELD2, FORMAT=A20 , $
FIELD=FIELD3, ALIAS=FIELD3, FORMAT=I3 , $
$
SEGNAME=CHILD1, SEGTYPE=S1, PARENT=ROOT_SEG, $
FIELD=FIELD4, ALIAS=FIELD4, FORMAT=I9, INDEX=I, $
FIELD=FIELD5, ALIAS=FIELD5, FORMAT=A9, INDEX=I, $
$
SEGNAME=CHILD2, SEGTYPE=S1, PARENT=CHILD1, $
FIELD=FIELD6, ALIAS=FIELD6, FORMAT=I5, INDEX=I, $
FIELD=FIELD7, ALIAS=FIELD7, FORMAT=A5, INDEX=I, $
FIELD=FIELDX, ALIAS=FIELDX, FORMAT=A5, INDEX=I, $
-***********************************************************
-* NOW ISSUE CREATE AND USE FOR FOCUS DB
-***********************************************************
FILEDEF DUMPSEG01 DISK &APPROOT..\MYAPP\DUMPSEG01.FTM
FILEDEF DUMPSEG02 DISK &APPROOT..\MYAPP\DUMPSEG02.FTM
FILEDEF DUMPSEG03 DISK &APPROOT..\MYAPP\DUMPSEG03.FTM

USE
D:\IBI\APPS\MYAPPS\MYFILE.FOC NEW
END

CREATE FILE MYFILE
-RUN
-***********************************************************
-* SEG 1 LOAD
-***********************************************************
MODIFY FILE MYFILE
FIXFORM FROM DUMPSEG01
DATA ON DUMPSEG01
END

-***********************************************************
-* SEG 2 LOAD
-***********************************************************
MODIFY FILE MYFILE
FIXFORM FROM DUMPSEG02
DATA ON DUMPSEG02
-*
MATCH FIELD1
ON MATCH REJECT
ON NOMATCH CONTINUE
-*
MATCH FIELD4
ON MATCH REJECT
ON NOMATCH INCLUDE
END

-***********************************************************
-* SEG 3 LOAD
-***********************************************************
MODIFY FILE MYFILE
FIXFORM FROM DUMPSEG03
DATA ON DUMPSEG03
-*
MATCH FIELD1
ON MATCH REJECT
ON NOMATCH CONTINUE
-*
MATCH FIELD4
ON MATCH REJECT
ON NOMATCH CONTINUE
-*
MATCH FIELD6
ON MATCH REJECT
ON NOMATCH INCLUDE
END

-************************************************************
-*NOW YOU CAN POPULATE FIELDX SAFELY
-************************************************************

GOOD LUCK
P
 
Posts: 42 | Location: UK | Registered: October 23, 2005Report This Post
Gold member
posted Hide Post
Thanks! Cool


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode
 
Posts: 74 | Location: Gaithersburg, MD | Registered: August 08, 2006Report 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     Mainframe FOCUS - Modify/Update

Copyright © 1996-2020 Information Builders