Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Re: help with mainframe file

Reply
Thread Tools

Re: help with mainframe file

 
 
John Bokma
Guest
Posts: n/a
 
      09-03-2003
GregD wrote:

> Im working with a mainframe file that contains packed decimal fields
> in some of the records. Each record (line) is supposed to be a fixed
> length of 200. Part of what Im working on is comparing the first 7


my $line;
my $prev = ""; # safe, since it is not 7 characters.
my $count = 0;
while (defined($line = <FILE>)) {

my $current = substr($line, 0, 7); # first 7 characters
next if $current eq $prev;

$count++;
$prev = $current;
}

--
Kind regards, feel free to mail: mail(at)johnbokma.com (or reply)
virtual home: http://johnbokma.com/ ICQ: 218175426
John web site hints: http://johnbokma.com/websitedesign/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect to Mainframe to download a file =?Utf-8?B?ZGlub28=?= ASP .Net 3 09-07-2006 09:03 PM
Reading file from Mainframe GenxLogic Java 1 07-27-2006 05:41 AM
Carrer advice : Java and Mainframe... Mirlitone Java 12 09-29-2005 06:12 PM
Who knows Class MainFrame? tony_lincoln@yahoo.com Java 2 08-31-2005 09:08 PM
Java on a Mainframe? Barry Burd Java 7 12-02-2003 08:56 PM



Advertisments