This discussion is archived
2 Replies Latest reply: Mar 3, 2012 9:31 AM by Steve_Clamage RSS

PCC-F-02044, CMD-LINE:  Illegal or out of range value for option

865860 Newbie
Currently Being Moderated
Good day,

I very new to Pro*C and its compiler, i was tasked to recompile a program from a previous developer and got stuck with the above mentioned problem.

The command i'm using to compile the program is: proc xxx.pc

This returns the illegal or out of range value error
#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <sqlda.h>
#include <sqlcpr.h>
#include <sqlca.h>
#include <stddef.h>


using namespace std;

  char myfile[60];     
  char puk [][];

  int last_col = 0;
  int last_row = 0;
  int line_nr = 0;
  string line = "";  
int main(int argc, char *argv[])
{    

  
    if (argc != 2)
    {
       return(1);
    }

  ifstream myfile;
  myfile.open (argv[1],ios::in);

      
  if (myfile.is_open())
  {
    while (! myfile.eof() )
    //while(getline(myfile,line)) 
    {
      getline (myfile,line);
      
      line_nr++; //counting number of lines
            
      line = trim(line); //remove whitespaces
      
      if (line == "\r" or line.length()  == 0) {
         continue;  //ignore blank lines
       }

       if (line_nr == 1) {         
          last_col = 1;
          last_row = 0;
          puk [last_row][last_col] = line;          
       } else if (line_nr > 1 && line.substr(1,3) != 'OOF') {          
          last_col = last_col + 1;
          puk [last_row][last_col] = line;          
       } else {     
         last_row = last_row + 1;
          puk [last_row][1] = line;                    
       }

    }
    myfile.close();
    line_nr = 0;
  }

  return 0; 
}        

         
Any assistance will be appreciated.

Regards,
  • 1. Re: PCC-F-02044, CMD-LINE:  Illegal or out of range value for option
    865860 Newbie
    Currently Being Moderated
    My pcscfg.cfg file is set as follows:
    sys_include=(/usr/include/c++/4.1.1/iostream,/usr/include/c++/4.1.1/backward/iostream.h,/usr/include/c++/4.1.1/fstream,/usr/include/c++/4.1.1/backward/fstrea
    m.h,/usr/bin/strings,/usr/include/string.h,/usr/include/strings.h,/usr/include/stdio.h,/usr/lib/syslinux/com32/include/stdio.h,/oracle/client/9.2.0/precomp/p
    ublic/sqlda.h,/oracle/client/9.2.0/precomp/public/sqlcpr.h,/oracle/client/9.2.0/precomp/public/sqlca.h,/usr/include/linux/stddef.h,/usr/lib/gcc/x86_64-redhat
    -linux/4.1.1/include/stddef.h,/usr/lib/syslinux/com32/include/stddef.h,/usr/lib/syslinux/com32/include/bitsize/stddef.h,/usr/include,/usr/lib/gcc-lib/i386-re
    dhat-linux/2.96/include,/oracle/app/oracle/client/precomp/public,/user/include/g++-3)
    ltype=short
  • 2. Re: PCC-F-02044, CMD-LINE:  Illegal or out of range value for option
    Steve_Clamage Pro
    Currently Being Moderated
    This forum is for discussion of C++ programming in general, and using the Oracle C++ compiler in particular.

    Although Pro*C is now available as part of OIC with Oracle Studio 12.3, it is actually part of Oracle's database product. You are more likely to get a helpful answer in a database programming forum.
    Start here:
    https://forums.oracle.com/forums/category.jspa?categoryID=18

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points