《库存零件管理系统讲课讲稿.doc》由会员分享,可在线阅读,更多相关《库存零件管理系统讲课讲稿.doc(8页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、Good is good, but better carries it.精益求精,善益求善。库存零件管理系统-库存零件管理系统COBOL程序代码表示如下:IDENTIFICATIONDIVISION.PROGRAM-ID.COBZUOYE.ENVIRONMENTDIVISION.INPUT-OUTPUTSECTION.FILE-CONTROL.SELECTINVENTORY-FILEASSIGNTOINV-DATA.SELECTREPORT-FILEASSIGNTOP-FILE.DATADIVISION.FILESECTION.FDINVENTORY-FILELABELRECORDISSTAN
2、DARD.01PART-RECORD.02PART-NUMBERPIC9(4).02QTY-ON-HANDPIC9(4).02PRICE-EACHPIC99V99.FDREPORT-FILELABELRECORDISSTANDARD.01REP-LINE.02FILLERPICX.02REP-RECPICX(80).WORKING-STORAGESECTION.01PAGE-HEADING-LINE.02FILLERPICX(20)VALUESPACE.02FILLERPICX(16)VALUEINVENTORYREPORT.01COLUMN-HEADING-LINE.02FILLERPICX
3、.02FILLERPICX(8)VALUEPARTNUM.02FILLERPICX(5)VALUESPACES.02FILLERPICX(16)VALUEQUANTITYONHAND.02FILLERPICX(5)VALUESPACES.02FILLERPICX(10)VALUEPRICEEACH.02FILLERPICX(5)VALUESPACES.02FILLERPICX(6)VALUEAMOUNT.01END-OF-JOB-LINE.02FILLERPICX(23)VALUESPACES.02FILLERPICX(16)VALUEENDOFREPORT.01DETAIL-LINE.02F
4、ILLERPICX(3)VALUESPACES.02PART-NUMBERPIC9(4).02FILLERPICX(13)VALUESPACES.02QTY-ON-HANDPICZ(4).02FILLERPICX(13)VALUESPACES.02PRICE-EACHPIC999.99.02FILLERPICX(4)VALUESPACES.02INVENTORY-VALUEPIC9(7).99.PROCEDUREDIVISION.OPEN-LINE.OPENINPUTINVENTORY-FILEOUTPUTREPORT-FILE.MOVESPACETOREP-LINE.O-HEADING-LI
5、NE.WRITEREP-LINEFROMPAGE-HEADING-LINEAFTER1.WRITEREP-LINEFROMCOLUMN-HEADING-LINEAFTER2.MOVESPACESTOREP-LINE.WRITEREP-LINEAFTER1.READ-RECORD.READINVENTORYFILEATENDGOTOJOB-END.MULTIPLYQTY-ON-HANDOFPART-RECORDBYPRICE-EACHOFPART-RECORDGIVINGINVENTORY-VALUE.MOVECORRPART-RECORDTODETAIL-LINE.WRITEREP-LINEFROMDETAIL-LINEAFTER1.GOTOREAD-RECORD.JOBEND.WRITEREP-LINEFROMEND-OF-JOB-LINEAFTER2.CLOSEINVENTORY-FILEREPORT-FILE.STOPRUN.JCL语句:输入数据:00001WANGXIAOTA0001M10000YX00002ZHANGMING0002F9900YX00003MENGZHENG0003F8900YX输入程序如下图所示:SHUREU输入JCL语句如下所示:执行程序如下图所示:MAXCC=0建立表,对表中数据初始化,如下图所示:-