欢迎来到天天文库
浏览记录
ID:22951143
大小:339.23 KB
页数:13页
时间:2018-11-02
《cobol语言程序设计实验报告-实验二》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、COBOL语言程序设计实验报告姓名学号班级指导教师开设学期2012-2013第二学期实验题目实验二:客户信息文件处理实验日期2013年6月评定成绩评定人签字评定日期东北大学软件学院2013年3月一、实验目的掌握基本COBOL语句的使用,包括OPEN,CLOSE,READ,WRITE,PERFORM,MOVE和STOPRUN。并且能够编写一个较为复杂的cobol程序来解决现实生活中的一些问题,并能更加熟练的运用主机系统进行编程等操作。二、实验内容与实验步骤实验内容:读取客户信息文件,按照一定的格式将客户记录进行输出处理。1.实验输入数据文件:FILEIN1每
2、一个客户输入记录包含以下数据:COLU酮SCONTENTS1—6CustomerNumber(6digits)7—26CustomerName27—46StreetAddress47-61City62—63Z-letterStateAddreviation64—73Zipcode(fromat:99999一9999)74—77Yearoflastpurchase78—80unused如:000001JACKLIXINGFAROADDALIAN8612345-123420132.实验输出数据:文件:OUTFILE1将2000年以后大连市最新买方的客户信息输出
3、,输出文件格式如下:CustomerName/Yearoflastpurchase/CustomerNumber/StreetAddress打印一份客户报告,格式如下图所示。1醤£ditE$
4、it^Settingsy5、jelpGOITCoM«nTC014.CO的L.F1LEL1白(0UTFILE1)•01.00籲•钃■•■ba■■iTopofD.t.■000001CUSTOKCRINOALIAN000002YEARNUMBERAODRESS(KXKK>3JACKLI2013000001X1NGFAROAD0400046、YJ22001000004XINGFAROADoeoeosLBS2QQ3000007KAIYUAROADooeooeSYY20050000SOLIUZHEROADGWW7SYM2019000011XINCFAROAD(XXKKX8YJZ2013000014XINGFAROAD07、AD000014SYY2013000030XINGFAROAD000015SYH2013000031XINGFAROAD000016YJZ2013000034XINGFAROAD000017LOG2013000037XINGFAROADFl-K>lpF2«SplitF3,ExitF5«RfIndFfi«Rch>ngeF9«SmjipFXO«LPftGECAuzaimmor;n曲》8、9、?>4<.穗.,tmmmColumns000010010、07:==MSG>==MSG>000100000200000300000400000500000600000700000800000900001000001100001200001300001400001500Command实验程序截图:源程序名:FILTEST人I-TMJ撕WEHUJ=.^eEllW^l麝1釋J圖I團IMl备11、fel糾連I>1»l沴FileEditEditSettingsMenuUtilitiesCompilersTestHelpEDITUR016.COBOL.S0URCE(LAB2)-01.0312、***********************************TopofDdtzd****************************:-Warning-TheUNDOcommandisnotavailableuntilyouchangeyoureditprofileusingthecommandRECOUERVON.INENTIFICATIONDIUISION.PROGRAM-ID.LAB2-ENUIRONMENTDIUISION.INPUT-OUTPUTSECTION.FILE-CONTROL.SELECTIN-FILEASSIGNTOIN13、FILEFILESTATUSISIN-STATUS.SELECTO
5、jelpGOITCoM«nTC014.CO的L.F1LEL1白(0UTFILE1)•01.00籲•钃■•■ba■■iTopofD.t.■000001CUSTOKCRINOALIAN000002YEARNUMBERAODRESS(KXKK>3JACKLI2013000001X1NGFAROAD040004
6、YJ22001000004XINGFAROADoeoeosLBS2QQ3000007KAIYUAROADooeooeSYY20050000SOLIUZHEROADGWW7SYM2019000011XINCFAROAD(XXKKX8YJZ2013000014XINGFAROAD07、AD000014SYY2013000030XINGFAROAD000015SYH2013000031XINGFAROAD000016YJZ2013000034XINGFAROAD000017LOG2013000037XINGFAROADFl-K>lpF2«SplitF3,ExitF5«RfIndFfi«Rch>ngeF9«SmjipFXO«LPftGECAuzaimmor;n曲》8、9、?>4<.穗.,tmmmColumns000010010、07:==MSG>==MSG>000100000200000300000400000500000600000700000800000900001000001100001200001300001400001500Command实验程序截图:源程序名:FILTEST人I-TMJ撕WEHUJ=.^eEllW^l麝1釋J圖I團IMl备11、fel糾連I>1»l沴FileEditEditSettingsMenuUtilitiesCompilersTestHelpEDITUR016.COBOL.S0URCE(LAB2)-01.0312、***********************************TopofDdtzd****************************:-Warning-TheUNDOcommandisnotavailableuntilyouchangeyoureditprofileusingthecommandRECOUERVON.INENTIFICATIONDIUISION.PROGRAM-ID.LAB2-ENUIRONMENTDIUISION.INPUT-OUTPUTSECTION.FILE-CONTROL.SELECTIN-FILEASSIGNTOIN13、FILEFILESTATUSISIN-STATUS.SELECTO
7、AD000014SYY2013000030XINGFAROAD000015SYH2013000031XINGFAROAD000016YJZ2013000034XINGFAROAD000017LOG2013000037XINGFAROADFl-K>lpF2«SplitF3,ExitF5«RfIndFfi«Rch>ngeF9«SmjipFXO«LPftGECAuzaimmor;n曲》
8、
9、?>4<.穗.,tmmmColumns0000100
10、07:==MSG>==MSG>000100000200000300000400000500000600000700000800000900001000001100001200001300001400001500Command实验程序截图:源程序名:FILTEST人I-TMJ撕WEHUJ=.^eEllW^l麝1釋J圖I團IMl备
11、fel糾連I>1»l沴FileEditEditSettingsMenuUtilitiesCompilersTestHelpEDITUR016.COBOL.S0URCE(LAB2)-01.03
12、***********************************TopofDdtzd****************************:-Warning-TheUNDOcommandisnotavailableuntilyouchangeyoureditprofileusingthecommandRECOUERVON.INENTIFICATIONDIUISION.PROGRAM-ID.LAB2-ENUIRONMENTDIUISION.INPUT-OUTPUTSECTION.FILE-CONTROL.SELECTIN-FILEASSIGNTOIN
13、FILEFILESTATUSISIN-STATUS.SELECTO
此文档下载收益归作者所有