cobol unix命令行参数如何工作 [英] How cobol unix command line parameter works

查看:198
本文介绍了cobol unix命令行参数如何工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要你在Unix / COBOL部分的输入。目前我正在研究Legacy数据迁移项目。如果你有问题,请给我提供以下问题的线索。



我的要求 - 我有30个COBOL独立程序,它们与任何COBOL程序都没有关联,所有程序都包含逻辑从索引主文件读取并仅作为输出写入行顺序文件,我们已经知道INPUT / OUTPUT的路径..我想在单个批处理文件中运行30个COBOL程序(如sh ALLPROGRAMS.BAT)



所以我只是想知道以下几个问题。



1)在30个cobol程序编译成功后,我想给我的MicroFocus COBOL运行时通过批处理输入和输出文件路径。另外,如果我发现PROGRAM8.COB在打开输入文件时出现问题,那么我会忽略PROGRAM8.COB并继续使用PROGRAM9.COB,我们是否需要在COBOL代码中添加任何逻辑? (我认为Linkage部分 - 应该实现什么逻辑)



示例 -

> runco​​bol PROGRAM1.COB / usr / rmcobol / input / PART.BNK /usr/rmcobol/output/PART.TXT

> runco​​bol PROGRAM2.COB /usr/rmcobol/input/PART.BNK /usr/rmcobol/output/PART.TXT

-

-

-

-

-

-

> runco​​bol PROGRAM30.COB /usr/rmcobol/input/PART.BNK /usr/rmcobol/output/PART.TXT



请关注此事。在此先感谢。

I need your inputs on Unix/COBOL part.Currently I am working on Legacy data Migration project. Please give me clue on below questions if you have.

My requirement- I have 30 COBOL stand alone programs which is not linked with any COBOL programs, All programs contains logic of reading from Index master file and writing into Line sequential file only as output and we knew the paths of INPUT/OUTPUT already.. I wanted to run 30 COBOL programs in single Batch file ( like sh ALLPROGRAMS.BAT)

So I just wanted to know few below questions.

1) After 30 cobol programs compiled successfully I wanted to give my input and output file paths in MicroFocus COBOL runtime thru Batch. Also, If I find PROGRAM8.COB has issue on opening input file ,then i ignore PROGRAM8.COB and proceed with PROGRAM9.COB , Do we need to add any logic in COBOL code for this? ( I think Linkage section- what logic should implement)

Example -
>runcobol PROGRAM1.COB /usr/rmcobol/input/PART.BNK /usr/rmcobol/output/PART.TXT
>runcobol PROGRAM2.COB /usr/rmcobol/input/PART.BNK /usr/rmcobol/output/PART.TXT
-
-
-
-
-
-
>runcobol PROGRAM30.COB /usr/rmcobol/input/PART.BNK /usr/rmcobol/output/PART.TXT

Any idea on this please. Thanks in advance.

推荐答案

理查德,谢谢你的回复。我的程序输入路径对于所有程序都是不同的,输出路径是相同的。我将如何在COBOL运行时输入?我正在使用sun solaris unix机器(ex runcbol progname.cob inputpath outputpath。如何使我的cobol相应更改。希望你明白我的意思。请帮忙。
Hi Richard, Thanks for your reply. My program input path is different for all programs and output path is same. How will i enter this in COBOL runtime ? I am using sun solaris unix machine (ex runcbol progname.cob inputpath outputpath. How will make my cobol changes accordingly. hope u got my point. please help.


我们如何保重这个脚本unix命令行。请提供线索。高度适应。提前谢谢,
Also How do we take care this script unix command line. please provide me clue. highly appropriated.thanks in advance,


这篇关于cobol unix命令行参数如何工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆