Operating System - HP-UX
1753930 Members
9887 Online
108810 Solutions
New Discussion юеВ

Invoking a executable with command line arguments

 
Gerard Powell
Advisor

Invoking a executable with command line arguments

On HP Unix 11i while calling COBOL executables with command line arguments is prefixing a tab before the first command line argument. The COBOL executables are called by system function call from C.
Suggest us how to ommit the prefixing of tab for the first command line argument.
2 REPLIES 2
Hein van den Heuvel
Honored Contributor

Re: Invoking a executable with command line arguments

Sounds like a programming error in the C code, where it builds the command string. If that is the case, then we would have to see snippets of the code to try and help further. Notably the variable declarations for the copmmand line passed to system, and the operations used to build it: how is it inialized? memset? static text? how is it filled? sprintf? strncpy?...

I suppose it could also be a cobol special feature.
If you execute the cobol directly from the shell, does it not show the tab?

Finally how do you even know a 'tab' is there? Could it be interpreting the data wrongly? Could the tab be a character count for the next piece of string?

Good luck,
Hein.

Sandman!
Honored Contributor

Re: Invoking a executable with command line arguments

I agree with Hein that the source code of the C program needs to be looked at in order to find out what's going on. Please post it if you have it.

thanks