The above function being called via the following
&pkoutFile($OUTFP, ';:=~',"301","WPSPD", $valDate1, "SPREAD", \@retArr +ay);
where \@retArray is the array reference which contains the result set. We are able to access the contents of the result set in the above function, but unable to copy the contents to the hash variable @ff. Code snippet for this is given below. $rowsHdl is the array reference
# determine the field names if ($colNamesHdl) { @ff=(); for ($i=0; $i <= $#$colNamesHdl; $i++) { push(@ff, $$colNamesHdl[$i]); } } else { $k = $$rowsHdl[0]; @ff = keys(%$k); } $j = $#$rowsHdl; for ($i=0; $i <= $j; $i++) { @paramVals = (); foreach $k (@ff) { $k1= $k; $k1 =~ s/(^[\n\r\s\t]+)|([\n\r\s\t]+$)//g; $val = $$rowsHdl[$i]->{$k}; push(@paramVals, $k . $delim2 . $val); }
In reply to Re^2: Unable to print the contents of an array reference passed from the main pgm to the flat file
by Anonymous Monk
in thread Unable to print the contents of an array reference passed from the main pgm to the flat file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |