Focal Point
[SOLVED]MODIFY not working (FOC419) FIXFORM SUBCOMMAND ELEMENT OR FIELDNAME NOT REC

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

October 16, 2018, 09:34 AM
Rifaz
[SOLVED]MODIFY not working (FOC419) FIXFORM SUBCOMMAND ELEMENT OR FIELDNAME NOT REC
Hi All,

I'm trying to update the FOCUS file through MODIFY but it throws (FOC419) FIXFORM SUBCOMMAND ELEMENT OR FIELDNAME NOT RECOGNIZED.

Please point me out, where I'm going wrong.

-SET &ECHO='ALL';
-SET &ECHO='ON';

-DEFAULTH &SVR='abcdepxyz1';
-DEFAULTH &STATUS='completed';
-DEFAULTH &BLOCKERFLAG='N';
-DEFAULTH &COMMENTS='Good';
APP HOLD ibisamp
-*DEFINE FILE IBI_INVENTORY
-*STATUS/A50='';
-*BLOCKERFLAG/A1='';
-*COMMENTS/A500 ='';
-*END
-*TABLE FILE IBI_INVENTORY
-*SUM  
-*STATUS 
-*BLOCKERFLAG
-*COMMENTS
-*BY SVR 
-*WHERE SVR EQ '$$$$$p$$$$'
-*ON TABLE HOLD AS IBIPROD FORMAT FOCUS
-*ON TABLE SET HOLDLIST PRINTONLY
-*END
-*-RUN

DEFINE FILE IBIPROD
STATUS/A50='&STATUS';
BLOCKERFLAG/A1='&BLOCKERFLAG';
COMMENTS/A500 ='&COMMENTS';
END
TABLE FILE IBIPROD
SUM  
STATUS 
BLOCKERFLAG
COMMENTS
BY SVR 
WHERE SVR EQ &SVR.QUOTEDSTRING
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS HOLD1 FORMAT FOCUS
END

MODIFY FILE IBIPROD
FIXFORM FROM HOLD1
MATCH SVR
ON MATCH UPDATE STATUS BLOCKERFLAG COMMENTS
ON NOMATCH INCLUDE
DATA ON HOLD1
END
-RUN


TABLE FILE IBIPROD
PRINT *
END
-EXIT  


?FF IBIPROD
FILENAME=  IBIPROD
VAH               E01           A20V
SEG01.STATUS      E02           A50
SEG01.BLOCKERFLAG E03           A1
SEG01.COMMENTS    E04           A500
STATUS                          A50
BLOCKERFLAG                     A1
COMMENTS                        A500

?FF HOLD1
FILENAME=  HOLD1
VAH           E01           A20V
STATUS        E02           A50
BLOCKERFLAG   E03           A1
COMMENTS      E04           A500


Thanks,
Rifaz

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


-Rifaz

WebFOCUS 7.7.x and 8.x
October 16, 2018, 04:01 PM
Waz
I don't see SVR in the results of ?FF HOLD1 or IBIPROD, does the TABLE FILE work ?


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!

October 16, 2018, 09:30 PM
Rifaz
Thanks Warren, originally the fieldname is VAH, just replaced it with SVR for focalpoint. And, yes TABLE FILE works.

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


-Rifaz

WebFOCUS 7.7.x and 8.x
October 17, 2018, 11:29 AM
jgelona
This error indicates that you have a field in the HOLD1 master that is not in the IBIPROD master. I think this error in this case is misleading, which happens sometimes. I've been using the FOCUS language for over 30 years and I've never used another FOCUS file as the input transaction file for MODIFY. Try removing the FORMAT FOCUS in the ON TABLE HOLD command.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
October 17, 2018, 01:57 PM
Rifaz
Thanks John for the insights! Removed FORMAT FOCUS for HOLD1. No errors, here is the output, seems to be a success but not I expected in the report output.

   0 TRANSACTIONS:         TOTAL =     1  ACCEPTED=     1  REJECTED=     0
SEGMENTS:             INPUT =     0  UPDATED =     0  DELETED =     0
TABLE FILE IBIPROD
PRINT *
END
0 NUMBER OF RECORDS IN TABLE=       47  LINES=     47
0 HOLDING HTML FILE ON PC DISK ...


I'm expecting the default values to be supplied to the HOLD1 & make update in the IBIPROD FOCUS file. But, for STATUS, BLOCKERFLAG, COMMENTS is just blank.
   SRV         STATUS    BLOCKERFLAG     COMMENTS 
abcdepxyz1



-Rifaz

WebFOCUS 7.7.x and 8.x
October 17, 2018, 02:09 PM
BabakNYC
Is IBIPRD a single segment focus file?


WebFOCUS 8206, Unix, Windows
October 17, 2018, 02:18 PM
Rifaz
yes... here goes the master

 FILENAME=IBIPROD , SUFFIX=FOC     , $
  SEGMENT=SEG01, SEGTYPE=S1, $
    FIELDNAME=SVR, ALIAS=E01, USAGE=A20V, $
    FIELDNAME=STATUS, ALIAS=E02, USAGE=A50, $
    FIELDNAME=BLOCKERFLAG, ALIAS=E03, USAGE=A1, $
    FIELDNAME=COMMENTS, ALIAS=E04, USAGE=A500, $
 



-Rifaz

WebFOCUS 7.7.x and 8.x
October 17, 2018, 02:37 PM
BabakNYC
I created ibiprod and tested the following in 8.203. Does this code work on your machine? It seems to work for me.

  

DEFINE FILE CAR
SVR/A20V=COUNTRY;
STATUS/A50=CAR;
BLOCKERFLAG/A1='F';
COMMENTS/A500=COUNTRY|CAR|COUNTRY|'THIS IS JUST A TEXT FIELD I CREATED SO I CAN TEST THE MODIFY';
END
TABLE FILE CAR
PRINT SVR STATUS BLOCKERFLAG COMMENTS
ON TABLE HOLD AS HOLD1
END
-RUN
MODIFY FILE IBIPROD
FIXFORM FROM HOLD1
MATCH SVR
ON MATCH UPDATE STATUS BLOCKERFLAG COMMENTS
ON NOMATCH INCLUDE
DATA ON HOLD1
END
-RUN
TABLE FILE IBIPROD
PRINT *
END



WebFOCUS 8206, Unix, Windows
October 17, 2018, 02:50 PM
TexasStingray
Rifaz,

Please try it without specifying a hold format on the table request.

FYI for those out there that are using hold format focus if you are creating temporary files and have a lot of data this can add a lot amount of over head. When I worked for IBI I visited a customer that was using FORMAT FOCUS with several steps and the job would take hours, after they removed the FORMAT FOCUS where is was not actually needed it finished in less than 30 minutes.

Just some Food for Thought.

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




Scott

I'm not using any format focus in my code. In my environment this code works as expected.


WebFOCUS 8206, Unix, Windows
BabakNYC, sorry had it addressed to the wrong individual.




Scott

Thanks Scott.

Thank you so much BabakNYC for the hints.

I have not touched the FOCUS for couple of years, totally with the infrastructure in the LINUX platform, made me to forget one of the basics.. i.e., order executing the FOCUS code.
The fields STATUS, BLOCKERFLAG & COMMENTS are considered from the IBIPROD FOCUS which is empty and I didn't tell in my FOCUS code to update which rows.

Problem is here with the DEFINE,
 
DEFINE FILE IBIPROD
STATUS/A50=IF SVR EQ &SVR.QUOTEDSTRING THEN '&STATUS' ELSE ''; 
BLOCKERFLAG/A1=IF SVR EQ &SVR.QUOTEDSTRING THEN '&BLOCKERFLAG' ELSE ''; 
COMMENTS/A500 =IF SVR EQ &SVR.QUOTEDSTRING THEN '&COMMENTS' ELSE '';
END
TABLE FILE IBIPROD
SUM  
STATUS 
BLOCKERFLAG
COMMENTS
BY SVR 
WHERE SVR EQ &SVR.QUOTEDSTRING
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HOLD1 
END  


Thanks everyone for the help!


-Rifaz

WebFOCUS 7.7.x and 8.x