Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     -WRITE on AS400 WebFOCUS
Go
New
Search
Notify
Tools
Reply
  
-WRITE on AS400 WebFOCUS
 Login/Join
 
Master
posted
Has anybody used -WRITE to update (APPEND to an AS400 flat file? Is there something special I need to do?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Did you put the (APPEND on the filedef?


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, 2006Reply With QuoteReport This Post
Master
posted Hide Post
My code

 
FILEDEF FOCAUDIT DISK RS6000/FOCAUDIT ( APPEND
-RUN
-* -SET &ECHO=ALL;
-SET &AUDIT_TIME = EDIT('&TOD.EVAL','99$99$99');
-SET &AUDIT_DATE = '&YYMD.EVAL'|'&AUDIT_TIME.EVAL';
-DEFAULT &AUDIT_USER='ouruser';
-SET &AUDIT_USER = GETUSER('A8');
-* -SET &AUDIT_FEX  = '&FEX.EVAL';
-SET &AUDIT_SRVR='400SRV';
-RUN

-WRITE FOCAUDIT  &AUDIT_DATE  &AUDIT_FEX  &AUDIT_USER  &AUDIT_SRVR
-RUN

 

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


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Pat,

Ginny is not on, so, I hope she doesn't mind...

Your dataset name should have a suffix, and, you'll need write access on it:

FILEDEF FOCAUDIT DISK RS6000/FOCAUDIT.dat or .ftm or .txt (APPEND

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1958 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
Not sure about the AS400. But on an AIX box, I've found that a -RUN closes and reopens the output file... thus overlaying what was previously there. Is that what you are experiencing?

-Diptesh Patel


Diptesh
WF 7.1.7 - AIX, MVS
 
Posts: 79 | Location: Warren, NJ, USA | Registered: October 25, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
This looks like MRE, so, you may need:

APP FI FOCAUDIT DISK RS6000/FOCAUDIT.dat or .ftm or .txt (APPEND


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1958 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
Tom,

The file extention doesn't apply on AS400, that's a pc/unix thing- none of our AS400 files has an extention.

Diptesh,

This same fex works on the AIX (UNIX with the UNIX path of course). Without the -RUN after the FILEDEF I get a message saying it isn't filedef'd


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Pat,
You do need to have a a value for &AUDIT_FEX, since you write it out. But you had it commented, which may lead to unwanted results. The -RUN after the filedef is needed, but the one after the -SET's is not. The code would look like:
APP FI FOCAUDIT DISK RS6000/FOCAUDIT (APPEND
-RUN
-* -SET &ECHO=ALL;
-SET &AUDIT_TIME = EDIT('&TOD.EVAL','99$99$99');
-SET &AUDIT_DATE = '&YYMD.EVAL'|'&AUDIT_TIME.EVAL';
-DEFAULT &AUDIT_USER='WFOCUS';
-SET &AUDIT_USER = GETUSER('A8');
-SET &AUDIT_FEX  = '&FEX.EVAL';
-SET &AUDIT_SRVR='400SRV';

-WRITE FOCAUDIT  &AUDIT_DATE  &AUDIT_FEX  &AUDIT_USER  &AUDIT_SRVR
-RUN

But, is there some error that you receive or any undesired reuslts?


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Master
posted Hide Post
This is an online server procedure executed from our intranet interface. The &AUDIT_FEX is set in the individual program and this is -INCLUDEd. I -TYPEd my variables to be sure all had values and they are:

20090421080617 amd018a WFOCUS 400SRV

I also tried the AP FI instead of the FILEDEF with the same results. The message I am getting is somewhat meaningless it is

(FOC325) ERROR WRITING FILE NAMED: FOCAUDIT 1


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     -WRITE on AS400 WebFOCUS

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