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 have a flat file in fixed format that has these columns fld1~fld2~fld3~fld4 (In my master I have used FILL1 for ~ delimiter)
I am trying to update a row in the flat file(FLAT1) using the MODIFY command, to retain the original record on NO MATCH and to do an update on a MATCH.
TABLE FILE FLAT1 PRINT FLD1 COMPUTE FLD2/A6 = 'XXXXXX' ; COMPUTE FLD3/A6 = 'YYYYYY' ; COMPUTE FLD4/A6 = 'ZZZZZZ' ; WHERE FLD1 EQ '&fld1' ON TABLE HOLD AS FLAT2 END
MODIFY FILE FLAT1 FIXFORM FROM FLAT2 MATCH FLD1 ON NOMATCH OLD ON MATCH INCLUDE FLD2 FLD3 FLD4 DATA ON FLAT2 ENDThis message has been edited. Last edited by: Kerry,
WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
ON MATCH OLD is a typo. I actually had ON MATCH INCLUDE
So, 1. HOLD file FLAT2 as format FOCUS 2. update using MODIFY - update FLAT1 you mean? 3. read FLAT2? and HOLD as alpha - but this would ceate a hold file. how would it update the flat file?
Sorry, didn't quite understand what you meant. could you elaborate a little?
WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
TABLE FILE FLAT1
PRINT
FLD1
COMPUTE NFLD2/A6 = IF FLD1 EQ '&fld1' THEN 'XXXXXX' ELSE FLD2 ;
COMPUTE NFLD3/A6 = IF FLD1 EQ '&fld1' THEN 'YYYYYY' ELSE FLD3 ;
COMPUTE NFLD4/A6 = IF FLD1 EQ '&fld1' THEN 'ZZZZZZ' ELSE FLD4 ;
WHERE FLD1 EQ '&fld1'
ON TABLE SAVE AS FLAT2
END
The FLAT1 file:
111BBBBCCDDDDD
222GGGGFFEEEEE
333BBBBCCDDDDD
444HHHHFFEEEEE
The FLAT1.mas
FILENAME=FLAT1, SUFFIX=FIX
SEGNAME=FLAT1, SEGTYPE=S0
FIELDNAME=F1, FORMAT=A3, ACTUAL=A3,$
FIELDNAME=F2, FORMAT=A4, ACTUAL=A4,$
FIELDNAME=F3, FORMAT=A2, ACTUAL=A2,$
FIELDNAME=F4, FORMAT=A5, ACTUAL=A5,$
The FLAT2 file:
111B1B1C2DD3DD
333BB3BC2D4DDD
The FLAT2.mas
FILENAME=FLAT2, SUFFIX=FIX
SEGNAME=FLAT2, SEGTYPE=S0
FIELDNAME=F1, FORMAT=A3, ACTUAL=A3,$
FIELDNAME=F2, FORMAT=A4, ACTUAL=A4,$
FIELDNAME=F3, FORMAT=A2, ACTUAL=A2,$
FIELDNAME=F4, FORMAT=A5, ACTUAL=A5,$
The FLAT.mas file:
FILENAME=FLAT, SUFFIX=FOC
SEGNAME=FLAT, SEGTYPE=S1
FIELDNAME=F1, FORMAT=A3, ACTUAL=A3,$
FIELDNAME=F2, FORMAT=A4, ACTUAL=A4,$
FIELDNAME=F3, FORMAT=A2, ACTUAL=A2,$
FIELDNAME=F4, FORMAT=A5, ACTUAL=A5,$
The focexec:
-* File dev3.fex
FILEDEF FLAT1 DISK C:\ibi\apps\focalpoint\FLAT1.TXT
FILEDEF FLAT2 DISK C:\ibi\apps\focalpoint\FLAT2.TXT
SET HOLDLIST=PRINTONLY
MODIFY FILE FLAT
FIXFORM FROM FLAT1
MATCH F1
ON MATCH REJECT
ON NOMATCH INCLUDE
DATA ON FLAT1
END
MODIFY FILE FLAT
FIXFORM FROM FLAT2
MATCH F1
ON MATCH UPDATE *
ON NOMATCH REJECT
DATA ON FLAT2
END
TABLE FILE FLAT
PRINT *
ON TABLE SAVE
END
!copy SAVE.FTM C:\ibi\apps\focalpoint\FLAT1.TXT
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
You're obviously new to focus since MODIFY does not work against flat files (Non-indexed) You can, however, accomplish what you want to do with Dialogue Manager code.