I have created a new master file. I want to add some data (.foc file) into it. Is power painter an only option? If not then how do i do that? If someone explain with an example then it would be fine.This message has been edited. Last edited by: Kerry,
Vasantha kumar 7.1.4/ Unix / OF:EXL2K
August 14, 2009, 08:37 AM
Danny-SRL
where does your data come from?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 14, 2009, 08:49 AM
Vasantha kumar
Hi danny,
It is just a dummy file with only one field like the one given in the post on McGyver's technique.
When i run the file it says No .Foc file found. so my question is, how do populate that file to make the procedure run?
Vasantha kumar 7.1.4/ Unix / OF:EXL2K
August 14, 2009, 10:03 AM
GinnyJakes
Look up the MODIFY command and use FIXFORM and the DATA statement to populate your file.
However, if you are using McGyver, you can also use a flat file.
Suppose you want to load numbers from 1 to 100. You use the MODIFY command:
MODIFY FILE NUM
FREEFORM NUM
MATCH NUM
ON NOMATCH INCLUDE
ON MATCH REJECT
DATA
-REPEAT #VASA FOR &I FROM 1 TO 100;
NUM=&I ,$
-#VASA
END
This should do the trick.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 17, 2009, 05:31 AM
Vasantha kumar
Hi danny,
Thanks!
When i use the same code with my values in it, it says "(FOC198) FATAL ERROR IN DATABASE I/O" - error. I have given a correct location for the .FOC file.
But code works fine without the DATASET command. Even I am able to see the output when i use the TABLE FILE inside the same proc.
But why am i not able to see the output when i use the file in another proc? I want to physically store that data file in UNIX. How could i achieve this?
Vasantha kumar 7.1.4/ Unix / OF:EXL2K
August 17, 2009, 09:16 AM
GinnyJakes
Try doing a CREATE FILE filename before the MODIFY.
But beware: when you do a CREATE file, the file will be written in the temporary directory. If you want it to be stored somewhere else, issue a APP HOLD before doing the create, in your case a APP HOLD BASEAPP.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 17, 2009, 11:03 AM
GinnyJakes
While what GamP says is generally true, but because he has a DATASET parameter in his master, the file will go there.
So you discarded the DATASET attribute. That's OK. Now you have to tell WF where to put the database. For that 2 things: 1. You use the USE command 2. You must have write permission to the directory where you want to write the focus database.
USE
[pathname]/NUM.FOC NEW
END
CREATE FILE NUM
MODIFY FILE NUM
FREEFORM NUM
MATCH NUM
ON NOMATCH INCLUDE
ON MATCH REJECT
DATA
-REPEAT #VASA FOR &I FROM 1 TO 100;
NUM=&I ,$
-#VASA
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 21, 2009, 06:27 AM
Vasantha kumar
Thanks danny!
It works..
Vasantha kumar 7.1.4/ Unix / OF:EXL2K
August 21, 2009, 06:31 AM
Vasantha kumar
[SOLVED]Originally posted by Vasantha kumar: Thanks danny!