我是 as400 Java 开发 (JT400) 的新手。我得到假脱机文件列表并阅读普通文本。现在我想将其转换为 excel (XLS) 文件。我正在尝试使用 Java 将 AS400 假脱机文件转换为 excel(XLS) 文件。但我失败了。有人知道怎么做吗?我可以直接从 as400 转换它吗?有谁知道如何使用 Java 将此假脱机文件(或此文本文件)转换为 excel 文件?
提前致谢!
我的一个这样的假脱机文件:
5722WDS V5R3M0 030905 RN IBM ILE RPG XXXXXXXXX/XXXX SSSS 10/01/11 06:19:46 Page 1
Command . . . . . . . . . . . . : CRTBNDRPG
Issued by . . . . . . . . . . : XXXXXXXXX
Program . . . . . . . . . . . . : CUSR
Library . . . . . . . . . . . : XXXXXXXXX
Text 'description' . . . . . . . : *SRCMBRTXT
Source Member . . . . . . . . . : CUSR
Source File . . . . . . . . . . : XXXXXXXXX
Library . . . . . . . . . . . : XXXXXXXXX
CCSID . . . . . . . . . . . . : 273
Text 'description' . . . . . . . :
Last Change . . . . . . . . . . : 10/01/11 06:19:41
Generation severity level . . . : 10
Default activation group . . . . : *YES
Compiler options . . . . . . . . : *XREF *GEN *NOSECLVL *SHOWCPY
*EXPDDS *EXT *NOSHOWSKP *NOSRCSTMT
*DEBUGIO *NOEVENTF
Debugging views . . . . . . . . : *SOURCE
Output . . . . . . . . . . . . . : *PRINT
Optimization level . . . . . . . : *NONE
Source listing indentation . . . : *NONE
Type conversion options . . . . : *NONE
Sort sequence . . . . . . . . . : *HEX
Language identifier . . . . . . : *JOBRUN
Replace program . . . . . . . . : *YES
User profile . . . . . . . . . . : *USER
Authority . . . . . . . . . . . : *LIBCRTAUT
Truncate numeric . . . . . . . . : *YES
Fix numeric . . . . . . . . . . : *NONE
Target release . . . . . . . . . : *CURRENT
Allow null values . . . . . . . : *NO
Define condition names . . . . . : *NONE
Enable performance collection . : *PEP
Profiling data . . . . . . . . . : *NOCOL
Licensed Internal Code options . :
Generate program interface . . . : *NO
Include directory . . . . . . . :
Preprocessor options . . . . . . : *NONE
5722WDS V5R3M0 030905 RN IBM ILE RPG XXXXXXXXX/XXXX SSSS 10/01/11 06:19:46 Page 2
Line <---------------------- Source Specifications ----------------------------><---- Comments ----> Do Page Change Src Seq
Number ....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+...10 Num Line Date Id Number
S o u r c e L i s t i n g
1 110917 000100
2 FCUS00D CF E WORKSTN 110917 000200
*--------------------------------------------------------------------------------------------*
* RPG name External name *
* File name. . . . . . . . . : CUS00D XXXXXXXXX/SSSSSS *
* Record format(s) . . . . . : RECORD RECORD *
*--------------------------------------------------------------------------------------------*
3 FCUSMAS01 UF A E DISK 110917 000300
4 110917 000400
5 /Free 110917 000500
6 110917 000600
*--------------------------------------------------------------------------------------------*
* RPG name External name *
* File name. . . . . . . . . : CUSMAS01 XXXXXXXXX/SSSSSS *
* Record format(s) . . . . . : CUSREC CUSREC *
*--------------------------------------------------------------------------------------------*
7=IRECORD 1000001
*--------------------------------------------------------------------------------------------* 1
* RPG record format . . . . : RECORD * 1
* External format . . . . . : RECORD : XXXXXXXXX/SSSSSS * 1
*--------------------------------------------------------------------------------------------* 1
8=I N 1 1 *IN03 1000002
9=I N 2 2 *IN06 1000003
10=I S 3 8 0$CUSID 1000004
11=I A 9 33 $CUSNAME 1000005
12=I A 34 58 $CUSADD1 1000006
13=I A 59 83 $CUSADD2 1000007
14=I A 84 108 $CUSADD3 1000008
15=I S 109 118 0$TELNO 1000009
16=I S 119 133 3$CRDLMT 1000010
17=ICUSREC 2000001
*--------------------------------------------------------------------------------------------* 2
* RPG record format . . . . : CUSREC * 2
* External format . . . . . : CUSREC : XXXXXXXXX/SSSSSS * 2
*--------------------------------------------------------------------------------------------* 2
18=I P 1 4 0CUSID 2000002
19=I A 5 29 CUSNAME 2000003
20=I A 30 54 CUSADD1 2000004
21=I A 55 79 CUSADD2 2000005
22=I A 80 104 CUSADD3 2000006
23=I S 105 114 0TELNO 2000007
24=I S 115 129 2CRDLMT 2000008
25 Exfmt record; 110917 000700
26 Dow Not *IN03; B01 110924 000800
27 If $CUSID <> *Zeros; B02 111001 000801
28 Chain (CUSID) CUSREC; 02 111001 000802
29 If %Found(CUSMAS01); B03 111001 000803