Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Comments
Richard MacCutchan 1-Dec-15 3:24am    
It is a little difficult to understand exactly what you mean, since each program takes the same input and output files. If you want to skip any program that does not run correctly, then just make sure it terminates itself if it encounters an error.
Member 12177493 3-Dec-15 9:02am    
Shall I write my batch file as below after my rmcobol compilation?

runcobol PROGRAM1.COB /usr/rmcobol/indata/FILE1 /usr/rmcobol/outdata/file1.txt
runcobol PROGRAM2.COB /usr/rmcobol/indata/FILE2 /usr/rmcobol/outdata/file2.txt
runcobol PROGRAM3.COB /usr/rmcobol/indata/FILE3 /usr/rmcobol/outdata/file3.txt
runcobol PROGRAM4.COB /usr/rmcobol/indata/FILE4 /usr/rmcobol/outdata/file4.txt
runcobol PROGRAM5.COB /usr/rmcobol/indata/FILE5 /usr/rmcobol/outdata/file5.txt
runcobol PROGRAM6.COB /usr/rmcobol/indata/FILE6 /usr/rmcobol/outdata/file6.txt
runcobol PROGRAM7.COB /usr/rmcobol/indata/FILE7 /usr/rmcobol/outdata/file7.txt
runcobol PROGRAM8.COB /usr/rmcobol/indata/FILE8 /usr/rmcobol/outdata/file8.txt


My question is here - How do i pass every input/output path to cobol program in runtime.

I think we need to do with Linkage section to pass variable in runtime. I am not sure this concept. How will I tell this to unix that this is my input path/output path of COBOL program when run time?

Hope I am not confused you :)

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.
 
Share this answer
 
Comments
phil.o 3-Dec-15 8:59am    
Not an answer. Please delete it.
Also How do we take care this script unix command line. please provide me clue. highly appropriated.thanks in advance,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900