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     [SOLVED] Getting errors within "Modify"

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Getting errors within "Modify"
 Login/Join
 
Guru
posted
In my FEX where I'm trying to use MODIFY logic to add new records to a flat file, I am getting the following:

 END                                                                 
 (FOC1110) ATTEMPT TO DELETE,UPDATE OR INCLUDE NON-WRITABLE SEGMENT 
 (FOC1110) ATTEMPT TO DELETE,UPDATE OR INCLUDE NON-WRITABLE SEGMENT 
 (FOC1110) ATTEMPT TO DELETE,UPDATE OR INCLUDE NON-WRITABLE SEGMENT 
 (FOC1110) ATTEMPT TO DELETE,UPDATE OR INCLUDE NON-WRITABLE SEGMENT 
 


Here is my code snippet:

TABLE  FILE PALSSTD
-*
WRITE
-*
      STU_ID       AS STU_ID
      AA003        AS STU_NAME
      CMP          AS CMP
BY    CMP          NOPRINT
BY    STU_ID       NOPRINT
BY    AA003        NOPRINT
WHERE CMP NE '   '
-*
ON TABLE HOLD AS R195CURR
END
-RUN
-*
MODIFY FILE R195PREV
FIXFORM FROM R195CURR
MATCH CMP STU_ID
   ON NOMATCH INCLUDE
   ON MATCH REJECT
DATA ON R195CURR
END
-RUN
 


Here is my Master for the file I'm trying to add records to:

  FILE=R195PREV   ,SUFFIX=FIX                                             
 SEGNAME=ROOT    ,SEGTYPE=S0                                             
   FIELD=CMP           ,R195010 ,A03 ,A03 ,TITLE='CAMPUS,NAME'         ,$
   FIELD=STU_ID        ,R195020 ,A09 ,A09 ,TITLE='STUDENT,ID'          ,$
   FIELD=STU_NAME      ,R195030 ,A32 ,A32 ,TITLE='STUDENT,NAME'        ,$
 


If anyone has an idea or two, I'd be happy to hear from you. Thanks in advance.

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


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
You cannot use MODIFY to update a flat file.

Why don't you modify the code to generate the desired flat file?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Hi, Francis,

I could, but once I get the "PREV" file created, I want to be able to only add new records to it each day; I don't want to create it every day.

Also, if I can't use MODIFY to update a flat file, what type of file can I create that I can use a MODIFY on? FOCUS?

Thanks for replying - it's appreciated.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
That is correct. It would have to be a FOCUS file. Or a relational table for which you have a write adapter license.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
You could add new records to the flat file by appending to the existing file using FILEDEF (append.

Alternatively, you could create a Master and a blank FOCUS database and use MODIFY every day to update the FOCUS database.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Webmeister,

Yes, using a FOCUS file would make things easier. However, if this is not an option, then MATCH FILE would be useful:
MATCH  FILE PALSSTD
WRITE
      STU_ID       AS STU_ID
      AA003        AS STU_NAME
      CMP          AS CMP
BY    CMP          NOPRINT
BY    STU_ID       NOPRINT
BY    AA003        NOPRINT
WHERE CMP NE '   '
RUN
FILE R195PREV
COUNT AA003
BY CMP 
BY STU_ID
AFTER MATCH HOLD AS R195CURR OLD-NOT-NEW
END
-RUN
FILEDEF R195PREV DISK R195PREV.FTM (APPEND
-* I suppose that this is the name of your R195 file...
TABLEF FILE R195CURR
PRINT CMP STU_ID AA003
ON TABLE HOLD AS R195PREV
END


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, 2006Report This Post
Platinum Member
posted Hide Post
You cannot MODIFY a flat file. MODIFY was originally designed for FOCUS files. You can use MODIFY on RDBMS files as well.


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
 
Posts: 146 | Location: Atlanta, GA | Registered: May 31, 2007Report This Post
Platinum Member
posted Hide Post
Hi Francis,
You can use MAINTAIN to update a flatfile (Suffix = FIX)if that is really what you want to do.


WebFOCUS & ReportCaster 8.1.05, 7.7.03 - AIX/LINUX, FOCUS 7.6.13 MVS, Output PDF, XLS-XLSX, DOCX and HTML
 
Posts: 146 | Location: Atlanta, GA | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
You can use Maintain if you have a license for Maintain Smiler


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Danny,

Thank you for your sample code... I'm working on trying to get it working.

To everyone else who has replied, thank you so much for your willingness to help.

Question: is there an MVS/TSO equivalent to FILEDEF?


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
DYNAM ALLOC


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
(Headslap) - Duh! Thank you.... sometimes it's the little things that are the largest headaches.

I think I'll make a book of all the helpful assists, ideas and suggestions received.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Guru
posted Hide Post
Tom,

Excuse my ignorance, but what is the DYNAM ALLOC line of code to be able to add records to the file, and not overwrite what is already on the file? I only ask because I haven't done this before.

Thank you......


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
DYNAM ALLOC DD WEBMAN DS YOUR.DATASET.NAME.HERE.DATA MOD REUSE
-RUN
OR

in JCL:

//WEBMAN DD DSN=YOUR.DATASET.NAME.HERE.DATA, DISP=MOD


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Thank you again.


Mainframe FOCUS 7.0
VM/CMS and MVS/TSO
 
Posts: 250 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
Search link top right will give you more results than you are likely to get in the same time.

You can also use TSO ALLOC - slightly different, similar job.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Web, welcome...


Hey T,

Do you know what happend to F. Dutch?? Haven't seen him on for a loooonnnggg time!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Web, it might be useful for you to download a copy of a mainframe FOCUS manual. There is a chapter in the back called "MVS/TSO Guide to Operations". This chapter, which isn't that long, has detailed instructions on DYNAM ALLOC and other DYNAM commands you might find useful. It will also give you a good idea on how FOCUS operates in a mainframe environment. I think a little reading now will save you many headaches in the future.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 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     [SOLVED] Getting errors within "Modify"

Copyright © 1996-2020 Information Builders