Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
Hi ,
I have a peculiar case, where my sed command is working on a file which contains lines of small length.
sed "s/XYZ:1/XYZ:3/g" abc.txt > xyz.txt
when abc.txt contains lines of small length(currently around 80 chars) , this sed command is working fine.
when abc.txt contains lines of... (3 Replies)
I am attempting to use awk to validate the length of each line in a fixed-width raw data file prior to reading in the data. I am happy with....
{if (length() == 403)
print > "valid.file";
else
print > " invalid.file"
}
...to separate out the valid length lines from invalid length... (3 Replies)
Hi,
I have requirement where record length is stored in an variable RECORD_LENGTH
Code goes as follows
RECORD_LENGTH=537
the above is arrived from
#RECORD_LENGTH=`awk -F"=" '{$sum+=$2} END{print $sum}' DBP_Claims_CFG.ini`
awk '
{
if (length() == '$RECORD_LENGTH')
print FNR, $0... (4 Replies)
Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types:
(H)eader Records
(D)etail Records
(T)railer Records
The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Hi,
Can anyone help with a effective solution ?
I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces.
The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Hello Everyone,
I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table.
Input Data-
------ ------------------------ ---- -----------------
WFI001 Xxxxxx Control Work Item A Number of Records
------ ------------------------... (5 Replies)
I have sourcefile and structure of source file,i want to check whether datatype and length mention in emp.txt is same as source file.
Example:
in emp.txt first row contains sno number so in source file also first column should contain only number if data is other than number then that... (1 Reply)
Discussion started by: katakamvivek
1 Replies
LEARN ABOUT DEBIAN
alzabo::runtime::joincursor
Alzabo::Runtime::JoinCursor(3pm) User Contributed Perl Documentation Alzabo::Runtime::JoinCursor(3pm)NAME
Alzabo::Runtime::JoinCursor - Cursor that returns arrays of "Alzabo::Runtime::Row" objects
SYNOPSIS
use Alzabo::Runtime::JoinCursor;
my $cursor = $schema->join( tables => [ $foo, $bar ],
where => [ $foo->column('foo_id'), '=', 1 ] );
while ( my @rows = $cursor->next )
{
print $rows[0]->select('foo'), "
";
print $rows[1]->select('bar'), "
";
}
DESCRIPTION
Objects in this class are used to return arrays of Alzabo::Runtime::Row objects when requested. The cursor does not preload objects but
rather creates them on demand, which is much more efficient. For more details on the rational please see the RATIONALE FOR CURSORS section
in Alzabo::Design.
INHERITS FROM
"Alzabo::Runtime::Cursor"
METHODS
next
Returns the next array of "Alzabo::Runtime::Row" objects or an empty list if no more are available.
If an individual row could not be fetched, then the array may contain some "undef" values. For outer joins, this is normal behavior, but
for regular joins, this probably indicates a data error.
all_rows
This method fetches all the rows available from the current point onwards. This means that if there are five set of rows that will be
returned when the object is created and you call "next()" twice, calling "all_rows()" after it will only return three sets.
The return value is an array of array references. Each of these references represents a single set of rows as they would be returned from
the "next" method.
reset
Resets the cursor so that the next "next()" call will return the first row of the set.
count
Returns the number of rowsets returned by the cursor so far.
next_as_hash
Returns the next rows in a hash, where the hash keys are the table names and the hash values are the row object. If a table has been
included in the join via an outer join, then it is only included in the hash if there is a row for that table.
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.8.8 2007-12-23 Alzabo::Runtime::JoinCursor(3pm)