Sponsored Content
Top Forums Shell Programming and Scripting Check Character matching from pos 7-15 to pos 211-219 if True then replace 211-219 with spaces Post 302709087 by lancesunny on Tuesday 2nd of October 2012 04:32:23 PM
Old 10-02-2012
Check Character matching from pos 7-15 to pos 211-219 if True then replace 211-219 with spaces

Script for if characters from positions 7-15 are matching with characters from position 211-219 then replace all char from 211-219 with 9 space.
Total length of record is 420. Here is the specification of the data in file.
Code:
Position    Field Data Type
-----------------------------------------------------
1          Capital Letter total length = 1
2-6          Blanks
7-15         Numeric Data total length 9
16-19       Numeric Data total length 4
20-25       Year and Month.
26-31        Blanks
32           Character Data total length 1
33           Character Data total length 1
34-41        Blanks
42-43        Character Data total length 2
44-48        Blanks
49          Capital Letter total length = 1
50-89          Character total 39 length
90-129        Character total 39 length 
130          Capital Letter total length = 1
131-170          Character Data total length 39
171-199         Alphabetic Data total length 29
200-201         Character Data total length 2
202-210         Numeric Data total length 5
211-219         Numeric Data total length 9
220-290         Character Data total length 60
291-330          Character Data total length 39
331-359       Alphabetic total length 29 character 
360-361       Character Data total length 2
362-370       Numeric Data total length 5
371           Capital Letter total length = 1
372-420         Blanks

Any help on this will be appreciated. Thanks in advance.

Last edited by lancesunny; 10-03-2012 at 11:07 AM.. Reason: Code tags
 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

This Weeks Lottery - Jackpot Now 219,500 Bits

If you want to win some Bits, the jackpot for tomorrow's drawing is up to 219,500 Bits Lottery tickets are only 100 Bits :D (0 Replies)
Discussion started by: Neo
0 Replies

2. Homework & Coursework Questions

POS 420 Week 4 IA

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: <LI style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in" class=MsoNormal>In your week4... (0 Replies)
Discussion started by: smiley76112
0 Replies

3. Shell Programming and Scripting

if characters from positions 7-15 are matching 219 then replace al

Script for if characters from positions 7-15 are matching with characters from position 211-219 then replace all char from 211-219 with 9 space. Total length of record is 420. Here is the specification of the data in file. Position Field Data Type... (2 Replies)
Discussion started by: lancesunny
2 Replies
Data::ObjectDriver::Profiler(3pm)			User Contributed Perl Documentation			 Data::ObjectDriver::Profiler(3pm)

NAME
Data::ObjectDriver::Profiler - Query profiling SYNOPSIS
my $profiler = Data::ObjectDriver->profiler; my $stats = $profiler->statistics; my $total = $stats->{'DBI:total_queries'}; my $log = $profiler->query_log; $profiler->reset; USAGE
$Data::ObjectDriver::PROFILE To turn on profiling, set $Data::ObjectDriver::PROFILE to a true value. Alternatively, you can set the DOD_PROFILE environment variable to a true value before starting your application. Data::ObjectDriver->profiler Profiling is global to Data::ObjectDriver, so the Profiler object is a global instance variable. To get it, call Data::ObjectDriver->profiler, which returns a Data::ObjectDriver::Profiler object. $profiler->statistics Returns a hash reference of statistics about the queries that have been executed. $profiler->query_log Returns a reference to an array of SQL queries as they were handed off to DBI. This means that placeholder variables are not substituted, so you'll end up with queries in the query log like "SELECT title, difficulty FROM recipe WHERE recipe_id = ?". $profiler->query_frequency Returns a reference to a hash containing, as keys, all of the SQL statements in the query log, where the value for each of the keys is a number representing the number of times the query was executed. $profiler->reset Resets the statistics and the query log. $profiler->total_queries Returns the total number of queries currently logged in the profiler. $profiler->report_queries_by_type Returns a string containing a pretty report of information about the current number of each type of query in the profiler (e.g. "SELECT", "INSERT"). $profiler->report_query_frequency Returns a string containing a pretty report of information about the current query frequency information in the profiler. perl v5.12.4 2011-08-29 Data::ObjectDriver::Profiler(3pm)
All times are GMT -4. The time now is 09:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy