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.
I need t replace a key value for all records in a Focus db (not in interactive mode) In Focus I made it with SCAN command and -REPEAT of DM In WF 5.x this feature has been removed. How can I do ? I NEED THIS FEATURE TO SAFE TIME, MONEY and TO AVOID ERRORS (HOLD and LOAD) Someone can help me ? Thanks Paolo
You could use Maintain to accomplish this. You would read in all the values. Make a copy of the stack and change the keyfield. Then include the new records and delete the old. The code would look like:
MAINTAIN FILE file FOR ALL NEXT keyfield INTO STK INFER keyfield INTO NEWSTK STACK COPY FROM STK INTO NEWSTK COMPUTE I/I4=1; REPEAT NEWSTK.FOCCOUNT COMPUTE NEWSTK(I).keyfield = 'NEW VALUE'; COMPUTE I=I+1; ENDREPEAT FOR ALL INCLUDE keyfield FROM NEWSTK IF FOCERROR = 0 THEN FOR ALL DELETE keyfield FROM STK END
Posts: 663 | Location: New York | Registered: May 08, 2003
Thanks, but this works also if the key field is in the parent segment an the db has got other childs segment ? I don't know if DELETE works right. Thanks Paolo
It will work with parent / child relationships. You just need to add the child field to the NEXT, INCLUDE and DELETE statements. Using the CAR file, it would look like:
NEXT COUNTRY CAR INTO STK
INCLUDE COUNTRY CAR FROM NEWSTK
DELETE COUNTRY CAR FROM STK
Posts: 663 | Location: New York | Registered: May 08, 2003
(FOC03833) Internal Error detected in MASPAR :Inconsistent KEY information: ERROR AT OR NEAR LINE 16 IN PROCEDURE TSTMAINT FOCEXEC * (FOC03833) Internal Error detected in MASPAR :MATCH:
with the following statement
MAINTAIN FILE CAR FOR ALL NEXT COUNTRY CAR INTO STK INFER COUNTRY INTO NEWSTK STACK COPY FROM STK INTO NEWSTK COMPUTE I/I4=1; REPEAT NEWSTK.FOCCOUNT COMPUTE NEWSTK(I).COUNTRY='PIPPO'; TYPE NEWSTK(I).COUNTRY ; COMPUTE I=I+1; ENDREPEAT FOR ALL INCLUDE COUNTRY CAR FROM NEWSTK IF FOCERROR = 0 THEN FOR ALL DELETE COUNTRY CAR FROM STK END END -RUN
Where is the error ? Paolo PS I have never used maintain
In your scenario, you would need to include the CAR field to NEWSTK. Try this...
MAINTAIN FILE CAR FOR ALL NEXT COUNTRY CAR INTO STK INFER COUNTRY CAR INTO NEWSTK STACK COPY FROM STK INTO NEWSTK COMPUTE I/I4=1; REPEAT NEWSTK.FOCCOUNT COMPUTE NEWSTK(I).COUNTRY='PIPPO'; TYPE NEWSTK(I).COUNTRY ; COMPUTE I=I+1; ENDREPEAT FOR ALL INCLUDE COUNTRY CAR FROM NEWSTK IF FOCERROR = 0 THEN FOR ALL DELETE COUNTRY CAR FROM STK END -RUN
Posts: 663 | Location: New York | Registered: May 08, 2003
Sorry but I get the error ex tstmaint (FOC03833) Internal Error detected in MASPAR :Inconsistent KEY information: ERROR AT OR NEAR LINE 16 IN PROCEDURE TSTMAINT FOCEXEC * (FOC03833) Internal Error detected in MASPAR :MATCH: with the following statement: USE /u/abp0/car.foc END
MAINTAIN FILE CAR FOR ALL NEXT COUNTRY CAR INTO STK INFER COUNTRY CAR INTO NEWSTK STACK COPY FROM STK INTO NEWSTK COMPUTE I/I4=1; REPEAT NEWSTK.FOCCOUNT COMPUTE NEWSTK(I).COUNTRY='PIPPO'; TYPE NEWSTK(I).COUNTRY ; COMPUTE I=I+1; ENDREPEAT FOR ALL INCLUDE COUNTRY CAR FROM NEWSTK IF FOCERROR = 0 THEN FOR ALL DELETE COUNTRY CAR FROM STK END -RUN
I don't know why you are getting an error. Try this. Before the INCLUDE and before the DELETE insert the line: REPOSITION COUNTRY
If that doesn't help, comment out the DELETE and INCLUDE statements. See if you are actually retrieving the data from the CAR file. Make a back-up of the CAR.FOC file and just put the DELETE back in. See if the DELETE or the INCLUDE is causing the error.
What release and platform are you on?
Posts: 663 | Location: New York | Registered: May 08, 2003
>>ex tstmaint DELETE commented: (FOC03833) Internal Error detected in MASPAR :Inconsistent KEY information: ERROR AT OR NEAR LINE 17 IN PROCEDURE TSTMAINT FOCEXEC * (FOC03833) Internal Error detected in MASPAR :MATCH:
INCLUDE commented: >>ex tstmaint (FOC03833) Internal Error detected in MASPAR :Inconsistent KEY information: ERROR AT OR NEAR LINE 20 IN PROCEDURE TSTMAINT FOCEXEC * (FOC03833) Internal Error detected in MASPAR :MATCH:
We are going to migrate to a new IBM machine with AIX5.3 (new library, etc...) I have installed wf5.3.2 on the machine and here the same test on mantain procedure works fine I don't know why. However my problem has been resolved; thanks to all.