问题描述
我想处理一个大型文本文件,该文件由c#或其他可视工作室语言中的大型机上的cobol数据集定义创建。我不想使用Cobol。我想使用C#或其他视觉工作室程序中文件的Cobol数据集定义
A 333 BANKIE BANK FSB -333 PO BOX 1234 CANTON OH 44711 3304445555
B 1111111 JON A SAMSONS 222 MAIN ST DRIVE SUNBERRYS TOWNSHIP PA 16166 4403334444 0 [email protected] SANDERA A SAMSONSUA 222 MAIN ST DRIVE SOONBERRY TOWNSHIP KZ 16666 724-777-0140 0
D 1111111 222 AFTERNOON DR SOONBERRY TOWNSHIP KZ 16666 USA 19 12 1 07-01-1997 99500 99500 07-01-1997
F 1111111 2 8 FR4421888660729203 00/00 / 0000 1997年7月11日1997年9月1日07月01日00/00/0000 2 98949.00 6.50000 625.42 360 2027年8月1日2.62500 360 2027年8月1日469.81 308.42 31.31 61368.00 778.51 + 2014年11月1日 - 14.02 + + + + 826.08 0 1 15 7 N 2 4.000 00/00/0000 9999.99 2014年10月1日2014年11月1日2014年10月16日2014年10月17日283 0 + + 2121.23 + 2749.67 + 4937.47 + 4875.57 + 582.27 + 5454.05 1 00/00/0000 + + + + N 00/00/0000 00/00/0000 00/00/0000 00 / 00/0000Ñ00/00/0000 00/00/0000 00/00/0000 00/00/0000Ñ00/00/0000 00/00/0000 00/00/0000 00/00/0000Ñ00/00 / 0000 00/00/0000 00/00/0000 00/00/0000 C 0 0000000000 0000000000 00/00/0000
G 1111111 120500 GHA 1 YR ADJ 1/5 DAPS 00/00/0000 00/00/0000 + 2.50000 + 99.99999 10/01/2014 2.62500 08/25/2014 0.11000 0000000000 10/01/2015 11/01/2013 00000469.81 11/01/2015 0000000000 08/01/2027
H 1111111 120500 GHA 1 YR ADJ 1/5 DAPS 7010 1年美国财政山区女性保护区RTAT BELEASE 12 12 1.00000 1.00000 5.00000 1.00000 1.00000 99.99999 12 12 99.99999 99.99999 99.99999 99.99999 99.99999 99.99999 206 24 30
I 1111111 11 12 1 A MARIANNE JOHNESON 800-333-1777 00/00/0000 0 11/14/2014 C 00/00/0000 05/02/2014 04/11/2014 00/00/0000 00/00 / 0000
K 1111111 11-10-2014 11 6 6 6 5 4 3 3 2 1。 。 。 1 1 2 0 1 2 3 4 5 6 6 5。 。 。 。 。 。 。 。 。 2 0 1 00/00/0000
M 1111111 11-14-2014 5027 + + + + + + + + + DM联系客户改为R
M 1111111 11-14-2014 5027 + + + + + + + + + + DM MS CLD SD将在星期一分支。 GAVE CELL PH#与她联系#777-777-4144。 BLM 11/14/14
M 1111111 11-14-2014 5027 + + + + + + + + + DM ACTION / RESULT CD从BRQL更改为BOQL
I want to process a large text file that was created by a cobol dataset definition on a mainframe in a c# or other visual studio language. I don't want to use Cobol. I want to use the Cobol dataset definition of the file from my C# or other visual studio program
A333BANKIE BANK FSB -333PO BOX 1234CANTONOH447113304445555
B1111111JON A SAMSONS222 MAIN ST DRIVESUNBERRYS [email protected] A SAMSONSUA222 MAIN ST DRIVESOONBERRY TOWNSHIPKZ16666724-777-01400
D1111111222 AFTERNOON DRSOONBERRY TOWNSHIPKZ16666USA1912107-01-1997995009950007-01-1997
F111111128FR442188866072920300/00/000007/11/199709/01/199707/01/201200/00/0000298949.006.50000625.4236008/01/20272.6250036008/01/2027469.81308.4231.3161368.00+778.5111/01/2014-14.02++++826.0801157N24.00000/00/00009999.9910/01/201411/01/201410/16/201410/17/20142830++2121.23+2749.67+4937.47+4875.57+582.27+5454.05100/00/0000++++N00/00/000000/00/000000/00/000000/00/0000N00/00/000000/00/000000/00/000000/00/0000N00/00/000000/00/000000/00/000000/00/0000N00/00/000000/00/000000/00/000000/00/0000C00000000000000000000000/00/0000
G1111111120500GHA 1 YR ADJ 1/5 DAPSA00/00/000000/00/0000+2.50000+99.9999910/01/20142.6250008/25/20140.11000000000000010/01/201511/01/201300000469.8111/01/2015000000000008/01/2027
H1111111120500GHA 1 YR ADJ 1/5 DAPS70101-YEAR US TREASURY HILLFEMERAL DESERVE RTAT BELEASE12121.000001.000005.000001.000001.0000099.99999121299.9999999.9999999.9999999.9999999.9999999.999992062430
I111111111121AMARIANNE JOHNESON800-333-177700/00/0000011/14/2014C00/00/000005/02/201404/11/201400/00/000000/00/0000
K111111111-10-201411666543321...112012345665.........20100/00/0000
M111111111-14-20145027+++++++++DMCONTACT WITH CUSTOMER CHANGED TO R
M111111111-14-20145027+++++++++DMMS CLD SD SHE WILL TAKE TO BRANCH ON MONDAY. GAVE CELL PH # TO CONTACT HER #777-777-4144. BLM 11/14/14
M111111111-14-20145027+++++++++DMACTION/RESULT CD CHANGED FROM BRQL TO BOQL
推荐答案
01 record.
03 first-name pic x(20).
03 last-name pic x(30).
03 address pic x(10).
$ C $ b in C#:
in C#:
using (StreamReader sr = new StreamReader(filePaths, System.Text.Encoding.ASCII))
{
String w_line;
// Read and display lines from the file until the end of
// the file is reached.
while ((w_line = sr.ReadLine())!= null)
{
string firstName = w_line.Substring(0,20) ;
string lasttName = w_line.Substring(20,30) ;
string address = w_line.Substring(50,10) ;
zb
zb
这篇关于我如何...在c#或其他可视化工作室语言中使用cobol数据集定义文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!