Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006
    Posts
    14

    Unanswered: Where does he get the data???

    Hello,

    I came into an old perl program... I know, what it should do - but I donīt know how it works... (my first contact with perl)

    It fills in a query file and the result is a report of a db-table.
    Here a part of the prog:

    #!/usr/bin/perl
    use CGI qw(:standard);
    # declaration
    my ($sd,$datum,$pa,@sa02,...)
    $datum='09.06.2006'
    $sd="/sciptdir";
    $pa="./pa.cgi";

    `"$sd"/ABGL 02 "$datum" > "$sd"/erg02`;
    @sa02=`"$pa" "$sd"/erg02`
    :
    for ($i=0;$i<$laenge;$i++){
    foreach $i (@spalte){
    print $sa02[$i];
    :
    :

    The file ABGL looks like this:

    echo "Number[_arg0,1]="
    echo "Type[_arg3,1]="$1
    echo "Date[_arg9,0]="$2
    echo "_disp=3"
    echo "Tour[_arg4,1]="

    The output at the end contains columns like
    zipcode,number,type,company,name,...

    The source must be one of the db-tables, but how can I see, what he really accesses???
    Are there any other files for configuration?

    Does anyone understand my problem? Can anyone explain this prog to me???

    Thanks in advance!
    sabine

  2. #2
    Join Date
    Feb 2006
    Posts
    56
    looks like this script is doing all the work: pa.cgi

    @sa02=`"$pa" "$sd"/erg02`

    the backtiks `` are used to run a program and capture the output that is generated.

    I'm not sure what this line is doing specifcally:

    `"$sd"/ABGL 02 "$datum" > "$sd"/erg02`;

    running some type of system command, maybe you know what that line is doing. It has to run first before the above line.

  3. #3
    Join Date
    Jun 2006
    Posts
    14
    `"$sd"/ABGL 02 "$datum" > "$sd"/erg02`;

    This line seems to start the queryfile ABGL with the parameters 02 and "$datum" and writes the result into the file erg02. But what table or data does this query use? There is no hint (or only I canīt see it...) in the code. Something like table= or db= or ... donīt know, how it must look like in Perl...

    @sa02=`pa.cgi "$sd"/erg02`
    This line is only to list the result file erg02 into the array sa02 (?)

  4. #4
    Join Date
    Feb 2006
    Posts
    56
    Quote Originally Posted by sge
    `"$sd"/ABGL 02 "$datum" > "$sd"/erg02`;

    This line seems to start the queryfile ABGL with the parameters 02 and "$datum" and writes the result into the file erg02. But what table or data does this query use? There is no hint (or only I canīt see it...) in the code. Something like table= or db= or ... donīt know, how it must look like in Perl...

    @sa02=`pa.cgi "$sd"/erg02`
    This line is only to list the result file erg02 into the array sa02 (?)

    I don't even know what ABGL is so I have no clue. Yes the last line appears to do what you think it does.

    Do you have access to pa.cgi source code?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •