Thanks to everyone who gave me ideas on Input Formats, unfortunately this report isn't a datafile so I couldn't figure out how the Text Modules since they look for quoted strings and there are none in the print file. I still have a problem though. I can't seem to parse out the data from this print file it's setup like:
<CODE>
Name ID PS Gender Age Month Code Cap Pool
LName, FName 99999 99 M 99.9 12/2000 Add 99.99 99.99
11/2000 New 99.99 99.99
The second line is a second record and sometimes there is no code at all. I wrote this snippet of code to find these data lines:
<CODE>
If ($line =~ /^(\w
A-Z0-9)+/ && length($line) >= 112) {
# parse line
}
elseif ($line =~ /^\s{60}
A-Z0-9/ && substr($line,60,3) ne "Inf") {
# parse line
}
But since there doesn't have to be another code there could be 9 more spaces. Right now I parse it like a fixed length string but I can't seem to get rid of trailing spaces for each field. Is there a simpler way?
Please let me know and thanks,
Jake
PS: I've not written HTML but there are braces (not curly) around the A-Z0-9 but for some reason they don't show up and it creates a link??? Also, 11/2000 should show up underneath 12/2000 for the second line.