I actually retrieve this number from a DB2 table, and then try to add the leading zeroes.
When I changed the syntax to:
$nfc_amt = sprintf("%07.0f", $nfc_amt);
The Result is correct. So there is something in $nfc_amt that I'm not seeing.
This is a little disconcerting to me. I was...
I have a variable $nfc_amt that I want to add leading zeroes to. The value of $nfc_amt is 115.
my code:
print "NFC_AMT before adding zeroes: $nfc_amt\n";
$nfc_amt = sprintf("%07d", $nfc_amt);
print "NFC_AMT after adding zeroes: $nfc_amt\n";
my result:
NFC_AMT before adding zeroes: 115...
It's been quite some time since I've used Access for data entry and I need some help. I have a form with a Listbox. The RowSource is a list I typed in. Just 2 rows with 2 Columns: "Checking Account";"DA";"Savings Account";"SG" . only column 2 is bound
On this form there is a Control for...
We have a couple DB2 databases (AIX) linked to our MS SQL Server. I want to connect to the linked DB2 databases via SQL Server. Does anyone know what the perl syntax is to do that? You can see the linked Databases under Server Objects/Linked Servers. They don't actually show up under...
I am a newbie to perl and trying to find a good method to replace data at the end of input records.
Input Data looks like this:
xxxxxxxxxxxxxxxxxxxxxxx*TL*12345CTOM~
xxxxxxxxxxxxxxxx*TL*92349A~
xxxxxxxxxxxxxxxxxxx*TL*46975M~
xxxxxxxxxx*TL*73124W9~
I need the output to look like this...
I have a field that is supposed to be a number with a decimal point, ie. 0351.69, but it looks like 035169 in the file. How do I print it to look like 351.69?
Thanks in advance for your help.
That's what I thought. I have no idea why it worked this way and not the way you did it. Oh well, I'm just happy I got it to work.
Thanks again dkyrtata.
I changed it around a little bit so I could better understand it. Here's what I did:
$rlen = length($record);
$olen = length($output{$key});
if ($rlen > $olen){$output{$key} = $record};
And now it works perfectly. Thanks for your help. I would never have gotten this far without it.
Hmmmm. I did check the last line of the while loop and it looks exactly like yours. Don't know. I'm trying to follow what's going on, but don't quit understand it yet.
my last line:
$output{$key} = $record if length($record) > length($output{key});
Wow that was fast! Thank you!
It almost worked. This is what I get for output:
1111 aaaa ffff
2222 bbbb
3333 cccc
The second record should have 'eeee' in the 3rd column.
So it's not quite working the way I need it. Any further suggestions?
I'm new at Perl and am a little intimidated by some of the syntax. I'd really appreciated any help I can get.
I have a file with multiple lines that have the same "key" . The output can have only one line per "key", but the information from all lines with like keys have to be in that one...
I need to extract specific data from an XML file that looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
- <Transmission xmlns:xalan="http://xml.apache.org/xslt">
- <ImageInfo SubscriberAMI="127100570" DCN="10173100150101" DateRecieved="20100622" AccountNumber="3330972"...
I have a simple script that dials a number until it gets a connection. I want to limit the number of times it tries to connect. How do I do that?
Current code:
Dial DATA "XXXXXX"
while $DIALING ; Loop while dialing.
endwhile
if $connectopen ; See if we're...
knob,
I don't know what i changed, but i just made sure the command line was pointing to the right directory. I didn't really think i changed anything. Then i ran it using the scheduler to execute it and it worked. Don't know if it was just a fluke or what. We'll see when it runs tomorrow...
I have a script that opens a capture file and writes to it at different steps throughout the script. This process works great when I manually execute the script. However, when the script is executed by the windows scheduler, the capture file is created but it is empty. Has anyone else ever...
Does anyone know of a way to capture a log of the FTP activity when using an aspect script to send files via ftp. Looking for something similar to the connection log that captures activity when using the data dialup up terminal.
I need to keep a record of when and what files were sent.
Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.