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
-*===============================================
-
EB
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