IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Prompt statement
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Silver Member
Posted
I need to modify a data file and add records using a prompt statement. I have created a master and Foc file, and I am using the following FOCex to prompt for data:

MODIFY FILE VEBA10
PROMPT SQ1 TCD1 TDATE1 A1 COMM1
MATCH SQ1
ON MATCH REJECT
ON NOMATCH INCLUDE
DATA

I am getting the following error:
(FOC319) WARNING. THE FIELD IS INDEXED AFTER THE FILE WAS CREATED: TDATE1
0 DATA FOR TRANSACTION 1
+ SQ1 =
(FOC210) THE DATA VALUE HAS A FORMAT ERROR: EXEC .9999 EOF
+ SQ1 =
(FOC210) THE DATA VALUE HAS A FORMAT ERROR: APP DISABLE
+ SQ1 =
(FOC016) THE TRUNCATED FIELDNAME IS NOT UNIQUE: SET PCHOLD-FMT
+ SQ1 =
0 TRANSACTIONS: TOTAL = 0 ACCEPTED= 0 REJECTED= 0
SEGMENTS: INPUT = 0 UPDATED = 0 DELETED = 0

It added the SET PCHOLD-FMT line to my FOCex the first time I ran it.

Can anyone help me?
 
Posts: 34 | Registered: October 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
i don't think the pchold-fmt has any place in a modify. but we need to see your master.
are you creating this file from scratch?
did you first build a master
then issue a CREATE command for the empty file?
 
Posts: 2630 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteEdit or Delete MessageReport This Post
Silver Member
Posted Hide Post
I agree that the PC Hold doesn't have a place in Modify. WebFocus is trying to add that, not me.

Here is my master:

FILE=VEBA10, SUFFIX=FOC
SEGNAME=SEG1, SEGTYPE=S1, $
FIELD=SQ1, ALIAS=SQ1, FORMAT=I4, FIELDTYPE=I, $
FIELD=TCD1, ALIAS=TCD1, FORMAT=I4,
ACCEPT= 311 OR 201 OR 301 OR 111 OR 211 OR 112 , TITLE='TRANS-,ACTION,CODE', DESCRIPTION='TYPE OF TRANSACTION RELATED TO VEBA', $
FIELD=TDATE1, ALIAS=TDATE1, FORMAT=YYMD, TITLE='TRANS-,ACTION,DATE', $
FIELD=A1, ALIAS=A1, FORMAT=D12.2, TITLE='AMOUNT,$', $
FIELD=COMM1, ALIAS=COMM1, FORMAT=A20, TITLE='COMMENT', $

I did build the file from scratch. I can load data to the file by typing in the values in the focexec after data and running it that way, but not by using the Prompt command. Not sure what you mean about issuing a Create command.
 
Posts: 34 | Registered: October 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Silver Member
Posted Hide Post
I just re-read your question about the Create command, and the answer is yes. When I saved the master file, WebFocus asked if I wanted to create the data file and I said yes to that.
 
Posts: 34 | Registered: October 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
So you are running a MODIFY within WebFOCUS?

Although you can use MODIFYs in WebFOCUS, I'd be surprised if a PROMPT would be supported.

You would need to use a MAINTAIN procedure or perhaps populate &vars with info and then use them in a MODIFY that doesn't use a prompt statement.
 
Posts: 342 | Location: Melbourne Australia | Registered: April 15, 2003Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Prompt statement

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.