In SCO Unix, I have a working script to give me a list of COBOL (files end in .cbl) programs containing a specific variable ($1) on a line which is not a comment. The output of the first grep will be the full path to a file, a colon, and the contents of the line where this variable is found.
The usual way to comment a line is to place an asterisk(*) in column 7 so a grep which excludes a colon, six characters which could be anything, and an asterisk works. I am trying to take out a type of comment starting with spaces or tabs followed by "*>" but thus far, no progress.
I am trying to insert the "grep -v -E" and the bracket contains a space and a tab. This new grep doesn't filter out anything.
The script ends when a sed reads the temporary file and takes out the colon and everything that follows it which is then passed to sort -u.
In SCO Unix, I have a working script to give me a list of COBOL (files end in .cbl) programs containing a specific variable ($1) on a line which is not a comment. The output of the first grep will be the full path to a file, a colon, and the contents of the line where this variable is found.
The usual way to comment a line is to place an asterisk(*) in column 7 so a grep which excludes a colon, six characters which could be anything, and an asterisk works. I am trying to take out a type of comment starting with spaces or tabs followed by "*>" but thus far, no progress.
I am trying to insert the "grep -v -E" and the bracket contains a space and a tab. This new grep doesn't filter out anything.
The script ends when a sed reads the temporary file and takes out the colon and everything that follows it which is then passed to sort -u.
TIA
Let me bring attention to the highlighted parts.' ":[ ]*\*>" A colon `:' followed by either one or more space or space, followed by a literal `*' followed by a `>'. That's not what you described and I highlighted.
I got it to fly by putting a space followed by a tab inside the "[]". Some dummy test files had various combinations of space(s) and tab(s) in front of "*>", and these did not show up.
Hey guys,
Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries.
However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
How safe is Dropbox and Ubuntu one? Would you store critical files or programs there? Any comments on the guarantee that the two companies provide and on the technology used for encryption? (1 Reply)
I must write a script to change all C++ like comments:
// this is a comment
to this one
/* this is a comment */
How to do it by sed? With file:
#include <cstdio>
using namespace std; //one
// two
int main() {
printf("Example"); // three
}//four
the result should be: (2 Replies)
Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Dear All,
while installing mfcobol in sco open unix 5 in piv m/cs, when run
#sh ./install
this error massage is comming
load error file lmfnewdb
error code 198 pc=0 call=-1 seg=0
198 load failor
chmod warrning can not acess /opt/lib/mflmf/mflmfdb no such file or directory (error-2)... (0 Replies)
Is there a way you can return a value from a script that is called from a rm cobol program...
01 WS-COMD-LINE-PGM X(39) value sh ./getUserId.sh 12345"
01 WS-RETURN-SYS-CODE PIC 9(8).
CALL "SYSTEM" USING WS-COMD-LINE-PGM
GIVING WS-RETURN-SYS-CODE.
... (1 Reply)
Does anyone use the following Cobol compiler:
RM/COBOL-85 Compiler - Version 5.15.00 for SCO Unix 386.
I am looking for a file that might be part of the distribution named "osmain.o"
Thanks. (0 Replies)
Hi,
I am working on a Mainframe to UNIX replatforming project.
we are facing problems with COBOL COMP-3 fields. We are using the Mainframe emulator software to download the data which has COMP-3 fields and using it as input to the same COBOL programs which were copied from Mainframe and did the... (1 Reply)
Hello guys,
I'm searching for a good COBOL compiler which runs on linux. In fact I have found one but I'm really lost with its installation!! I don't know how to install it and how it works. In fact I'm not so good in linux and I always have problems with installation, but this time it's... (1 Reply)