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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
AS400 HELP WANTED
 Login/Join
 
Gold member
posted
HI all,

I have a problem to write a text file in the AS400 IFS (format ALPHA). It works only if I use FORMAT DB2 but it's not what I want.

Here is the fex and the error returned by webfocus.
SET TEMPERASE = ON
*===============================================
-SET &TMP_APP = &IBIC_user;
-TYPE &TMP_APP
-*=======================
APP DELETE &TMP_APP
-*=======================
CMD pwd > verif.txt
-RUN
FILEDEF VERIF DISK verif.txt
-RUN
-READ VERIF &TMP_APP.A43.
-TYPE &TMP_APP
SET TEMPERASE=OFF
APP MAP TMP_APP DISK &TMP_APP
APP MAP TMP_APP DISK &TMP_APP
APP PREPENDPATH TMP_APP
APP SHOWPATH
APP HOLD TMP_APP
-*===============================================
-Big GrinEB
APP FI DESC DISK &TMP_APP/lstan.mas
-RUN
-WRITE DESC FILENAME=lstan, SUFFIX=FIX ,DATASET=&TMP_APP.EVAL/LSTAN.FTM, $
-WRITE DESC SEGMENT=LSTAN, SEGTYPE=S1, $
-WRITE DESC FIELDNAME=ANNEE, ALIAS=E01, USAGE=A4, ACTUAL=A04, $
-RUN


-*================================================
-:ETAP_AN
-SET &YEARFIN = EDIT(&DATEDMYY,'$$$$$$9999');
-SET &YEARDEB = &YEARFIN - 10;
-SET &UTIL = GETUSER('A8');
-TYPE &YEARDEB
-TYPE &YEARFIN
-TYPE &UTIL
APP FI LSTAN DISK &TMP_APP/LSTAN.FTM
-RUN
-SET &CPT = 0;
-REPEAT :ECRIT 10 TIMES
-SET &CPT = &CPT+1;
-SET &YEAR = '&YEARDEB.EVAL' + &CPT;
-TYPE &YEAR
-WRITE LSTAN &YEAR
-:ECRIT
-*================================================
-:ETAP_AFF
TABLE FILE TABAFF
PRINT
AFF_LIB
COMPUTE CHOIXSSAFF/A1 = 'N';
BY AFF_CODE
WHERE AFF_CODE NE 'S';
ON TABLE HOLD AS AFF01 FORMAT ALPHA
END
-RUN

RESULT
/home/iadmin/ibi/srv76/wfs/edatemp/ts006995
tmp_app
clb
standard_v8
standard_v7
baseapp
ibisamp
exemples
help
baseapp
1998
2008
IADMIN
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
0(INF32080) NOMBRE D ENREGISTREMENTS DANS LA TABLE= 21 LIGNES= 21
0(INF32073) ERREUR A OU PRES DE LA LIGNE 67 DANS LA PROCEDURE w8st20s_launch
(FOC350) ERREUR D'ECRITURE DU FICHIER DE SORTIE: AFF01

If anybody knows what to do, I would appreciate to have the solution.

A poor french girl in troubles......

Thanks


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Virtuoso
posted Hide Post
Cati,

Apparently, WF is trying to write to a directory called "tmp_app" to which you do not have permission. This is due to
quote:

-READ VERIF &TMP_APP.A43.
-TYPE &TMP_APP
SET TEMPERASE=OFF
APP MAP TMP_APP DISK &TMP_APP
APP MAP TMP_APP DISK &TMP_APP
APP PREPENDPATH TMP_APP
APP SHOWPATH
APP HOLD TMP_APP

I suggest you look at that.


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
Gold member
posted Hide Post
Hi Danny,

Thanks for the answer but the tmp_app is the directory created automatically by the TSCOM3 job running on the AS400.
I can create any object I want in this directory (master,..) except the file containing the data and I don't understand why.
I have all the permission needed to read, write, delete,....

It works if I do ON TABLE HOLD AS AFF01 FORMAT DB2 but in this case, the table is not created in the temp_app but in the default library of the user in the AS400. That's not what I want, I want the data to be in the temporary directory of the job.

I think this functioning is linked with the AS400 environment.

So, If anybody else has an idea.....

Thanks in advance.
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Master
posted Hide Post
Maybe I am missing it, but I don't see a FILEDEF for AFFO1. Other than that, you might try changing your ON TABLE HOLD AS AFF01 FORMAT ALPHA to ON TABLE SAVE AS AFF01. I don't know why, but on our system SAVE retains our files where HOLD does not.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Catherine,
It just might be possible that the file AFF01 is already there ...
You specify TEMPERASE to be off, and so someone may already have placed a file with the same name in the temp directory.
To check this (and be certain that the directory is clean as can be), you could do a 'CMD ls' just before the TABLE command. This will list all files in the directory.

Hope this helps a bit...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
In FOCUS on VM (the birthplace), SAVE respects your FILEDEF -- but HOLD ignores it, in order to ensure that the FOCTEMP and MASTER files are co-located. I believe that carries forward to WebFocus, and to other platforms.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders