I have written below script to add substring in a file containing fixed length record, but when I run below script I get error as:
My fixed length record has length around 2000, each file is having 5000 records and total number of files is approx. 4000. Please help me avoid this error as I'm getting this error while I run the script for a single file.
Last edited by Scott; 03-30-2012 at 12:13 PM..
Reason: Code tags
I am trying to generate a small report with the help of awk.
The contents are present in a file whose last line is very long.
I can't shorten this line as its generated after a lot of processing.
On reading this file awk says
record "starting of line ..." too long
record number 30
Now... (2 Replies)
Hi All,
I have a txt file which is an export of a query result from the database. The txt file contains 'Processid#sqlquery' from the database table.As the sqlquery is too long.... i am unable to get the fields seperated using the awk script as below:-
cat sql.txt | awk -F'#' '{printf $2}'... (2 Replies)
Hi
I receive a mainframe file which has very long records (1100 chars) with no field delimiters. I need to parse each record and output a comma delimited (csv) file. The record layout is fixed. If there weren't so many fields and records I would read the file into Excel, as a "fixed width"... (10 Replies)
Hi Everyone,
I have a txt file with 40k lines.
111 1.1.1.1
111 1.1.1.1
111 2.2.2.2
111 1.1.1.1
111 1.1.1.1
How would use perl to easy have IP list, the final result will be:
1.1.1.1,2.2.2.2,
I can only think using if to determine one by one through all 40k, this is working, but... (10 Replies)
I searched the forums but didn't see anything related to what I'm looking for. I need a script that would give me a listing of jobs running longer than, for example, 12 hours or so. Thanks in advance for your assistance!! (2 Replies)
Gurus,
I am writing a shell script that will be used to automate cold backup of an Oracle Database. The database size is around 300G and will take around 5-6 hours to copy.
I have finished the script till the copy of the datafiles. Now, I am stuck at the point where I need to monitor the... (4 Replies)
Hi All ,
I am getting record too long for the below command .
nawk -F\" '{a=a" "$2} END{for(i in a) print i,a }' test|sort|awk '{for(i=1;i<=NF;i++) t=t"\t"$i;if(NF>max)max=NF} END{for(i=1;i<=max;i++)print t }'
File test has 850 records ...
Please help.. (2 Replies)
Hi! all
can any one tell me how to compare current record of column with next and previous record in awk without using array
my case is like this
input.txt
0 32
1 26
2 27
3 34
4 26
5 25
6 24
9 23
0 32
1 28
2 15
3 26
4 24 (7 Replies)
riends
I have the following problem:
test.txt I have a file that has the following contents:
is a fixed-length file to the end of the number 12 has spaces, so that it is fixed length
123456789
123456789
123456789
12
This code shows me the length of each record, but in... (2 Replies)
Discussion started by: tricampeon81
2 Replies
LEARN ABOUT DEBIAN
sru::response::record
SRU::Response::Record(3pm) User Contributed Perl Documentation SRU::Response::Record(3pm)NAME
SRU::Response::Record - A class for representing a result record in a searchRetrieve response.
SYNOPSIS
my $record = SRU::Response::Record->new();
$record->recordData( '<title>Huck Finn</title>' );
$response->addRecord( $record );
DESCRIPTION
SRU::Response::Record is used to bundle up the information about a particular metadata record in a SRU::Response::SearchRetrieve object.
Typically you'll construct a record object and add it to the SearchRetrieve response.
METHODS
new()
You must supply the recordSchema and recordData parameters. recordPacking, recordPosition, and extraRecordData may also be supplied.
my $record = SRU::Response::Record->new(
recordSchema => 'info:srw/schema/1/dc-v1.1',
recordData => '<title>Huckleberry Finn</title>'
);
recordSchema()
The URI identifier of the XML schema in which the record is encoded. Although the request may use the server's assigned short name, the
response must always be the full URI.
recordData()
The record itself, either as a string or embedded XML. If would like to pass an object in here you may do so as long as it imlements the
asXML() method.
recordPacking()
The packing used in recordData, as requested by the client or the default: "XML".
recordPosition()
The position of the record within the result set. If you don't pass this in recordPosition will be automaticlly calculated for you when add
or retrieve a record from a SRU::Response::SearchRetrieve object.
extraRecordData()
Any extra data associated with the record. See the section on extensions for more information.
asXML()
perl v5.12.4 2009-11-20 SRU::Response::Record(3pm)