CGI/Perl Guide | Learning Center | Forums | Advertise | Login Site Search: in Perl Guide PerlGuru Forums Learning Ctr

Home: Perl Programming Help: Intermediate:
I am loosing value of my argument

digioleg54
User

Jul 19, 2016, 1:18 PM

Post #1 of 65 (30852 views)
 I am loosing value of my argument Can't Post
I have Perl script menu.pl. One of the argument I put from command line of menu is queue = 3. I checked it.
In this function args->{queue} = 1. I cannot understand why. I don't do anything with it.
In menu it is args_100{queue}. In function I put args->{queue}.
Where is my mistake?

FishMonger
Veteran / Moderator

Jul 19, 2016, 2:27 PM

Post #2 of 65 (30850 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
It's not possible to answer your question based on that limited and confusing info.

You need to post your code and exactly how you execute it. You also need to post any/all errors and warnings it produces and explain how the output differs from what you expect.

(This post was edited by FishMonger on Jul 19, 2016, 2:28 PM)

digioleg54
User

Jul 19, 2016, 2:32 PM

Post #3 of 65 (30847 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
The code is 1000 lines.

digioleg54
User

Jul 19, 2016, 2:39 PM

Post #4 of 65 (30844 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
The first is working menu. We put different values, date, port, queue and so on. Then we call the second script. Script starts with:
my \$args{};
and then when I print args->{queue}, instead 3 a get 1.

FishMonger
Veteran / Moderator

Jul 19, 2016, 2:42 PM

Post #5 of 65 (30841 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Without seeing your code, it's impossible for anyone to say what's wrong and how to fix it.

Write a short but complete test script which demonstrates the problem.

digioleg54
User

Jul 19, 2016, 2:50 PM

Post #6 of 65 (30839 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
*** Running : g:\invacct\perl\scripts\pfi_general_ledger_check.pl -port 10001 -e
nd_date 6/23/2016 -env PROD -nav -use_pos -basis GAAP -dir \\nynas1\nynds4\vol2\

#! usr/bin/perl

use strict;
use warnings;
use Getopt::Long;
use MOA::CLSUtils;
use MOA::PamReport;
use MOA::PamJobsPFI;
use MOA::Users;
use Data::Dumper;

my \$args={};

sub run_job{

print STDOUT "\$args->{queue}\n"

}

as you can see first line queue = 3. In sub \$args->{queue} =1, but must be 3

FishMonger
Veteran / Moderator

Jul 19, 2016, 2:54 PM

Post #7 of 65 (30836 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
You've got to be joking!

That incomplete code doesn't even begin to demonstrate the problem.

digioleg54
User

Jul 19, 2016, 2:58 PM

Post #8 of 65 (30833 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
The program g:\\invacct\\perl\\scripts\\pfi_general_ledger_check.pl last argument is 3.
It starts running and at the beginning instead 3 I print 1

digioleg54
User

Jul 19, 2016, 3:09 PM

Post #9 of 65 (30830 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
Can I ask you in a different way.
my \$que = pop(ARGV); it gives 3.
How can I put \$que into \$args->{queue}?

FishMonger
Veteran / Moderator

Jul 19, 2016, 5:58 PM

Post #10 of 65 (30819 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Can I ask you in a different way.
my \$que = pop(ARGV); it gives 3.
How can I put \$que into \$args->{queue}?

2 options:
 Code
`\$args->{queue} = \$que;`
or
 Code
`\$args->{queue} = \\$que;`

Those 2 statements have slightly different effects/results.

The first one copies the current value of \$que and the 2nd one creates a reference to the \$que var. If you use the 2nd example, if \$que is altered after that assignment, then so too will the value of \$args->{queue} change since it's a reference to the \$que var.

(This post was edited by FishMonger on Jul 19, 2016, 6:02 PM)

FishMonger
Veteran / Moderator

Jul 20, 2016, 2:20 PM

Post #11 of 65 (30794 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Moving PM communication over to the original thread where it belongs.

 Quote
I use it in a different program. But after that statement print args->{queue} = 1, but supposed to be different. And I don't know why.the line is:

if (!GetOptions(\$args,"help","dir=s","dev","port=s","end_date=s","pam","xrun","tb","nav","use_pos","basis=s","env=s","final","dev","journals","journals_load","close","no_glck","calc_nav","recycle","check_mzpx","performance","queue") || !\$args->{end_date} || !\$args->{port} )
{
usage(" -port and -end_date are required parameters");
}
I print exactly after the line and get 1.Something is wrong.

That is difficult to read, and difficult to maintain. At the very least you should add vertical whitespace i.e., put each option on a separate line.

Here's a cleaned up version.
 Code
`#!/usr/bin/perl  use strict; use warnings FATAL => 'all'; use Getopt::Long; use Data::Dumper;  my \$args = {}; GetOptions(\$args,             'help',             'dir=s',             'dev',             'port=s',             'end_date=s',             'pam',             'xrun',             'tb',             'nav',             'use_pos',             'basis=s',             'env=s',             'final',             'dev',             'journals',             'journals_load',             'close',             'no_glck',             'calc_nav',             'recycle',             'check_mzpx',             'performance',             'queue' ) or usage('Error in processing args');   if (! exists \$args->{end_date} || ! exists \$args->{port}) {     usage('-port and -end_date are required parameters'); }  print Dumper \$args;  sub usage {     my \$msg = shift || 'Error';     die "\$msg\n"; }`

Instead of the usage sub, a better approach would be to add the Pod::Usage module. An example of its usage is in the Getopt::Long documentation.
http://search.cpan.org/~jv/Getopt-Long-2.49.1/lib/Getopt/Long.pm#Documentation_and_help_texts

 Code
`C:\test>Perl-1.pl -end_date now -port 3 -app Unknown option: app Error in processing args`
 Code
`C:\test>Perl-1.pl -end_date now -port 3 \$VAR1 = {           'port' => '3',           'end_date' => 'now'         };`

(This post was edited by FishMonger on Jul 20, 2016, 2:24 PM)

FishMonger
Veteran / Moderator

Jul 20, 2016, 5:43 PM

Post #12 of 65 (30788 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
I've gone back over this thread and your PM's to me and as I've pointed out several times none of the code you've posted demonstrates your problem and it's clear that you have a minimal level of perl knowledge and probably won't be able to troubleshoot this on your own.

So, I will make this offer; if you provide me (via PM) a zip archive of your scripts and modules, I will spend a reasonable amount of time looking them over to see if I can find where your code is modifying that hash value. I'm assuming your code does lots of things that I can't reasonably duplicate so I may or may not be able to find the cause of the problem.

(This post was edited by FishMonger on Jul 20, 2016, 5:51 PM)

FishMonger
Veteran / Moderator

Jul 21, 2016, 8:58 AM

Post #13 of 65 (30769 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Copying the PM messages to this thread.

digioleg54
Below is my command and print dumper. I don't understand, why
 Quote
g:\invacct\perl\scripts\pfi_general_ledger_check.pl -port 10001 -e
nd_date 6/23/2016 -env PROD -nav -use_pos -basis GAAP -dir \\nynas1\nynds4\vol2\
 Code
`\$VAR1 = { 'journals' => 1, 'end_date' => '6/23/2016', 'nav' => 1, 'journals_load' => 1, 'queue' => 1, 'dir' => '\\\\nynas1\\nynds4\\vol2\\DATA\\INVACCT\\Fund_Recs_PFI', 'basis' => 'GAAP', 'use_pos' => 1, 'env' => 'PROD', 'port' => '10001' };`

fishmonger
 Quote
I don't know why I missed this earlier, maybe it was due to the poor formatting of that code, but the "queue" option is defined as a Boolean flag instead of an an integer. That is why it's being assigned a 1 instead of the 3.

digioleg54
how can I define it as integer?

fishmonger
'queue=i'

digioleg54
User

Jul 21, 2016, 9:36 AM

Post #14 of 65 (30765 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
when I put "queue=I" in Getopts, it show the message:

Option queue requires an argument

-port and -end_date are required parameters

-dev Use dev dir
-port PAM portfolio number
-start_date start_date of pam reports
-end_date end_date of pam reports. Date Format
is mm/dd/yyyy
-pam use reports( hard coded names ) run o
ut of pam to user hard coded directory
-xrun recycle auto run pam jobs
-tb run run trial balance only

digioleg54
User

Jul 21, 2016, 9:45 AM

Post #15 of 65 (30763 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
I use Perl for windows

FishMonger
Veteran / Moderator

Jul 21, 2016, 9:58 AM

Post #16 of 65 (30762 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
when I put "queue=I" in Getopts, it show the message:

Option queue requires an argument

You used the wrong character. You should use a lowercase i not an uppercase I.

(This post was edited by FishMonger on Jul 21, 2016, 10:00 AM)

digioleg54
User

Jul 21, 2016, 10:01 AM

Post #17 of 65 (30759 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I use lower case 'queue=i'

FishMonger
Veteran / Moderator

Jul 21, 2016, 10:10 AM

Post #18 of 65 (30757 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
C:\test>type Perl-1.pl
 Code
`#!/usr/bin/perl  use strict; use warnings FATAL => 'all'; use Getopt::Long; use Data::Dumper;  my \$args = {}; GetOptions(\$args,             'help',             'dir=s',             'dev',             'port=s',             'end_date=s',             'pam',             'xrun',             'tb',             'nav',             'use_pos',             'basis=s',             'env=s',             'final',             'dev',             'journals',             'journals_load',             'close',             'no_glck',             'calc_nav',             'recycle',             'check_mzpx',             'performance',             'queue=i' ) or usage('Error in processing args');   if (! exists \$args->{end_date} || ! exists \$args->{port}) {     usage('-port and -end_date are required parameters'); }  print Dumper \$args;  sub usage {     my \$msg = shift || 'Error';     die "\$msg\n"; }`

 Code
`C:\test>Perl-1.pl -port 10001 -end_date 6/23/2016 -env PROD -nav -use_pos -basis GAAP -dir \\nynas1\nynds4\vol2\DATA\INV ACCT\Fund_Recs_PFI -journals -journals_load -queue 3 \$VAR1 = {           'queue' => 3,           'basis' => 'GAAP',           'end_date' => '6/23/2016',           'env' => 'PROD',           'dir' => '\\\\nynas1\\nynds4\\vol2\\DATA\\INVACCT\\Fund_Recs_PFI',           'journals_load' => 1,           'journals' => 1,           'port' => '10001',           'nav' => 1,           'use_pos' => 1         };`

digioleg54
User

Jul 21, 2016, 10:12 AM

Post #19 of 65 (30755 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
Did you do it for Windows 7?

FishMonger
Veteran / Moderator

Jul 21, 2016, 10:15 AM

Post #20 of 65 (30752 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
yes

 Quote
C:\test>ver

Microsoft Windows [Version 6.1.7601]

(This post was edited by FishMonger on Jul 21, 2016, 10:16 AM)

digioleg54
User

Jul 21, 2016, 10:19 AM

Post #21 of 65 (30748 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
The problem is that I have menu. The menu ask questions, I put my answers as args. I catch \$job_queue=pop(@ARGV); 16th element is queue and it is =3, or any number I put. But if I put GetOpts 'dueue=i', program crushes

FishMonger
Veteran / Moderator

Jul 21, 2016, 10:23 AM

Post #22 of 65 (30745 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
What version of perl are you using and what version of Getopt::Long?

 Quote
I catch \$job_queue=pop(@ARGV);
That's a bad way to handle these types of options/arguments.

What is the output of dumping @ARGV prior to using pop or shift?
 Code
`print Dumper \@ARGV;`

(This post was edited by FishMonger on Jul 21, 2016, 10:26 AM)

digioleg54
User

Jul 21, 2016, 10:27 AM

Post #23 of 65 (30742 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
perl v5.18.4 for Win32
Getopts was installed in 2013
long.pm
package Getopt::Long;

use 5.004;

use strict;

use vars qw(\$VERSION);
\$VERSION = 2.42;

last modify Tue Oct 1 08:25:52 2013

FishMonger
Veteran / Moderator

Jul 21, 2016, 10:30 AM

Post #24 of 65 (30739 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Upgrade the module and dump @ARGV to verify its contents.

digioleg54
User

Jul 21, 2016, 10:34 AM

Post #25 of 65 (30738 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
\$VAR1 = [
'-port',
'10001',
'-end_date',
'6/23/2016',
'-env',
'PROD',
'-nav',
'-use_pos',
'-basis',
'GAAP',
'-dir',
'\\\\nynas1\\nynds4\\vol2\\DATA\\INVACCT\\Fund_Recs_PFI',
'-journals',
'-queue',
'5'
];

I put queue = 5 now

digioleg54
User

Jul 21, 2016, 10:49 AM

Post #26 of 65 (18653 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
how can I do that?

digioleg54
User

Jul 21, 2016, 10:53 AM

Post #27 of 65 (18652 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
anyway, I cannot do it. We have special team. And if I say now that GetOptions doesn't work, I don't think they will be happy

FishMonger
Veteran / Moderator

Jul 21, 2016, 11:58 AM

Post #28 of 65 (18643 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Please post a short but complete test script that demonstrates the problem so that I can try and duplicate this issue.

FishMonger
Veteran / Moderator

Jul 21, 2016, 12:06 PM

Post #29 of 65 (18640 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Execute the test script that I posted earlier. If that has the same problem you're seeing in your script, then that would indicate that there is a bug in that older module and should be upgraded.

digioleg54
User

Jul 21, 2016, 12:13 PM

Post #30 of 65 (18638 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
No, the result is OK. I will try to make short copy of the script and send you. But you have to make if as menu

digioleg54
User

Jul 21, 2016, 12:30 PM

Post #31 of 65 (18636 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I'll do it small parts

digioleg54
User

Jul 21, 2016, 12:37 PM

Post #32 of 65 (18634 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I send you two attachment. Let me know if you need something else
Attachments: generalledge.pl (1.73 KB)

FishMonger
Veteran / Moderator

Jul 21, 2016, 1:19 PM

Post #33 of 65 (18629 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
I'm real busy at work right now so I won't be able to look at your code until I get home.

digioleg54
User

Jul 21, 2016, 1:22 PM

Post #34 of 65 (18627 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
Sure, I understand.

Thanks a lot

digioleg54
User

Jul 21, 2016, 2:45 PM

Post #35 of 65 (18623 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I tried to do it like you suggest, but it is not working anyway. It may be Perl issue, old version. But the new version nobody will load in the company now

FishMonger
Veteran / Moderator

Jul 21, 2016, 4:46 PM

Post #36 of 65 (18621 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
I've looked over your tests scripts and it's clear that you don't understand the concept of a self contained test script that others can run. They both are using multiple custom modules which no-one else has access to so they can't test the scripts. They are also filled with unnecessary code, questionable to very poor code formatting and overall is poorly designed.

Regarding the value of the "queue", you didn't apply the correction that I told you it needed and that is why you still have the problem with that hash value.

Saying "it is not working anyway" is a very poor problem description and doesn't give any info on how it's failing. The code corrections I made in the test scripts I posted work correctly. I have no idea what changes you made to your code so I can't say why your code doesn't work.

digioleg54
User

Jul 21, 2016, 4:55 PM

Post #37 of 65 (18618 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I copied and paste your code

FishMonger
Veteran / Moderator

Jul 21, 2016, 5:08 PM

Post #38 of 65 (18615 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
I copied and paste your code

Which version, the one in post #11 or post #18?

The code in post 18 is what you should test. If that fails, then the root problem is a bug in the old module and if that's the case, it should be upgraded.

FishMonger
Veteran / Moderator

Jul 21, 2016, 5:18 PM

Post #39 of 65 (18612 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Did you write this app or was it written by someone else and you've been contracted to update it?

digioleg54
User

Jul 22, 2016, 3:29 AM

Post #40 of 65 (18602 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
#18. I contracted just troubleshooting it. Somebody else did it.

digioleg54
User

Jul 22, 2016, 6:00 AM

Post #41 of 65 (18592 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I did it one time today. Got a message:

Option queue requires an argument
Error in processing args

FishMonger
Veteran / Moderator

Jul 22, 2016, 6:24 AM

Post #42 of 65 (18589 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Did you supply the number arg to queue?

Did you pop @ARGV prior to executing the GetOptions() statement?

If you add an additional option after the queue, is that option and its value in the hash or is it missing?

digioleg54
User

Jul 22, 2016, 6:31 AM

Post #43 of 65 (18587 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I see the problem, but I can't work on it now. At 10 Am boss will come to test the program. I will explain him and if he let me change, I will. Otherwise , sorry. I am just consulting.
The problem is that in menu program owner commented two elements, but in GetOptions - not, and queue getting to different place.
If the boss want to spend more money, I can change it. Otherwise today is my last day.

I let you know the result

FishMonger
Veteran / Moderator

Jul 22, 2016, 6:41 AM

Post #44 of 65 (18584 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
 Quote
The problem is that in menu program owner commented two elements, but in GetOptions - not, and queue getting to different place

If the Getoptions() function is being used to parse the args, the ordering of the options won't matter but if shift/pop is being used to manually parse the args, then the order will make a big difference and is one of the reasons I said that using that approach is a bad idea.

digioleg54
User

Jul 22, 2016, 6:48 AM

Post #45 of 65 (18581 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
But somehow it cannot find the queue and ask for number

FishMonger
Veteran / Moderator

Jul 22, 2016, 6:55 AM

Post #46 of 65 (18579 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Are you referring to the menu prompt for the user to supply the value for that option?

(This post was edited by FishMonger on Jul 22, 2016, 6:55 AM)

digioleg54
User

Jul 22, 2016, 7:11 AM

Post #47 of 65 (18572 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
After I supply values, it goes to program and didn't print queue number even I make pop for it, then go to GetOptions and show the error, which I mention

FishMonger
Veteran / Moderator

Jul 22, 2016, 7:17 AM

Post #48 of 65 (18569 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
After I supply values, it goes to program and didn't print queue number even I make pop for it, then go to GetOptions and show the error, which I mention

Your wording in that sentence is a little confusing, but if you use pop before calling GetOptions(), then obviously the value for the last option (presumably the queue option) would be stripped out of the @ARGV array and cause the error message to be generated.

(This post was edited by FishMonger on Jul 22, 2016, 7:18 AM)

digioleg54
User

Jul 22, 2016, 7:42 AM

Post #49 of 65 (18566 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I don't use pop in GetOptions. I receive the message, that I copied from your #18. Pop I use in another place and it also doesn't find queue value.

FishMonger
Veteran / Moderator

Jul 22, 2016, 7:55 AM

Post #50 of 65 (18564 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post

If you add an additional option after the queue, is that option and its value in the hash or is it missing?

digioleg54
User

Jul 22, 2016, 8:06 AM

Post #51 of 65 (14304 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I didn't add anything after queue. It is the last.

FishMonger
Veteran / Moderator

Jul 22, 2016, 8:18 AM

Post #52 of 65 (14301 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
I realize it was the last option in your previous tests, but I'm asking you to adjust the order of the args (by adding 1 more option) to see what happens.

Part of the reason is to see if the Windows file type association is configured correctly. If it isn't, it could be cutting off part of the arguments.

What's odd to me is that your previous dump of the @ARGV array did have the value of the queue option and your dump of the hash had it as well but now you're saying that value is missing which is why I asked if you used pop before the GetOptions() call.

digioleg54
User

Jul 22, 2016, 8:35 AM

Post #53 of 65 (14299 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I will do it. But sometimes I am wondering why he was using so complicated system like \$data->{port}->{tb} and so on. Wasn't it easier to put data to different hashes and use them separately?

digioleg54
User

Jul 22, 2016, 8:43 AM

Post #54 of 65 (14295 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
Actually computer is pretty old, 2009, 32 bits, 4 G memory

FishMonger
Veteran / Moderator

Jul 22, 2016, 8:45 AM

Post #55 of 65 (14294 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
I would need to see more of the code to answer that question but I do agree that the code is overly complicated and based on the limited amount of code you've shown, I'd say its logic flow is messy/convoluted.

This app should have been written using one of perl's GUI frameworks and/or used dispatch tables.

FishMonger
Veteran / Moderator

Jul 22, 2016, 8:47 AM

Post #56 of 65 (14293 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
lol, that's on par with the systems I have to work with at our company.

digioleg54
User

Jul 22, 2016, 9:55 AM

Post #57 of 65 (14288 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
Sorry,
what is it:Windows file type association and where can I find and configure it correctly

digioleg54
User

Jul 22, 2016, 10:12 AM

Post #58 of 65 (14285 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I added last element after queue. Seems like the program doesn't see it, error message:

Option queue requires an argument

Error in processing args

-dev Use dev dir
-port PFI portfolio number
-start_date start_date of pam reports
-end_date end_date of pam reports. Date Format
is mm/dd/yyyy
-pam use reports( hard coded names ) run o
ut of pam to user hard coded directory
-xrun recycle auto run pam jobs
-tb run run trial balance only

FishMonger
Veteran / Moderator

Jul 22, 2016, 12:29 PM

Post #59 of 65 (14278 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
The assoc command is used to link the file ext to an executable and the ftype command is used to configure how it's executed and if it should accept arguments and how many args..

 Code
`C:\>help assoc Displays or modifies file extension associations  ASSOC [ext[=[fileType]]]    .ext      Specifies the file extension to associate the file type with   fileType  Specifies the file type to associate with the file extension  Type ASSOC without parameters to display the current file associations. If ASSOC is invoked with just a file extension, it displays the current file association for that file extension.  Specify nothing for the file type and the command will delete the association for the file extension.`

 Code
`C:\>help ftype Displays or modifies file types used in file extension associations  FTYPE [fileType[=[openCommandString]]]    fileType  Specifies the file type to examine or change   openCommandString Specifies the open command to use when launching files                     of this type.  Type FTYPE without parameters to display the current file types that have open command strings defined.  FTYPE is invoked with just a file type, it displays the current open command string for that file type. Specify nothing for the open command string and the FTYPE command will delete the open command string for the file type.  Within an open command string %0 or %1 are substituted with the file name being launched through the assocation.  %* gets all the parameters and %2 gets the 1st parameter, %3 the second, etc.  %~n gets all the remaining parameters starting with the nth parameter, where n may be between 2 and 9, inclusive.  For example:      ASSOC .pl=PerlScript     FTYPE PerlScript=perl.exe %1 %*  would allow you to invoke a Perl script as follows:      script.pl 1 2 3  If you want to eliminate the need to type the extensions, then do the following:      set PATHEXT=.pl;%PATHEXT%  and the script could be invoked as follows:      script 1 2 3`

I often manually edit the registry entry if it's not set correctly.

digioleg54
User

Jul 22, 2016, 12:41 PM

Post #60 of 65 (14276 views)
 Re: [FishMonger] I am loosing value of my argument [In reply to] Can't Post
I am doing it on my own computer. but I am on contract. I will tell boss, he can decide it.

thanks a lot for your help.
Next week I will be looking for new job, if it is possible on summer and in my age. :)

Laurent_R
Veteran / Moderator

Jul 22, 2016, 2:29 PM

Post #61 of 65 (14272 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Are you so old that it is so difficult?

FishMonger
Veteran / Moderator

Jul 22, 2016, 2:34 PM

Post #62 of 65 (14270 views)
 Re: [Laurent_R] I am loosing value of my argument [In reply to] Can't Post

At my age and location, it would be near impossible unless I consider going back to work for my brother in the (seafood) restaurant business. :(

(This post was edited by FishMonger on Jul 22, 2016, 2:37 PM)

digioleg54
User

Jul 26, 2016, 9:48 AM

Post #63 of 65 (14159 views)
 Re: [Laurent_R] I am loosing value of my argument [In reply to] Can't Post
unfortunately I am 61 and get a job ....... and summer

Laurent_R
Veteran / Moderator

Jul 26, 2016, 10:37 AM

Post #64 of 65 (14157 views)
 Re: [digioleg54] I am loosing value of my argument [In reply to] Can't Post
Hmm, sorry, it was meant to be funny, but I realize it wasn't at all.

Having said that, I am now 60. When I got fired almost 8 years ago due to the financial crisis back in 2008, I figured out that it would probably be difficult for me to find a regular employment contract, so I became a free-lance consultant, and that was pretty successful.

A month ago, I finally succeeded to sign a regular employment contract with the company for which I had been consulting in the last 3 and a half years; they feared that, if they did not offer me a regular employment contract, I might be interested to work for a competitor. That's how I've just found a regular job at the age of 60.

There is room for hope.

Good luck.

digioleg54
User

Jul 26, 2016, 10:44 AM

Post #65 of 65 (14154 views)
 Re: [Laurent_R] I am loosing value of my argument [In reply to] Can't Post
you see, I don't know how to be free-lance consultant, I don't now the site and what is the procedure. If you explain me, I would appreciate it. You do it here or write to digioleg@yahoo.com
The last company doesn't have programmers. They use contract to fix some problems, I talked to them.

 Announcements     PerlGuru Announcements Perl Programming Help     Frequently Asked Questions     Beginner     Intermediate     Advanced     Regular Expressions     mod_perl     DBI     Win32 Programming Help Fun With Perl     Perl Quizzes - Learn Perl the Fun Way     Perl Golf     Perl Poetry Need a Custom or Prewritten Perl Program?     I need a program that...     I Need a Programmer for Freelance Work     Throw Down The Gauntlet General Discussions     General Questions     Feedback     Tutorial/Article Suggestions for The Learning Cent     Internet Security Other Programming Languages     Javascript     PHP

 Search this forum this category all forums for All words Any words Whole Phrase (options) Powered by Gossamer Forum v.1.2.0