|
John Simmons / outlaw programmer wrote: I've tried changing the encoding
Im being presumptuous John and assuming you mean 'ASCII/BINARY' encoding here, with the edtFTP TransferType (I think, I only had a quick look) setting - and I dont think thats it .. been a long time since worked with any sort of VMS, but it sounds like the record attributes of the file are 'none', ie in VMS Speak, 'fixed-512'..
What you need the record attributes to be are something like
Stream-LF or
Stream-CR-LF
There's a command that goes someting like $ SET FILE/ATTRIBUTE=<attribute> <file> that may or may not change the file attributes, but Im pretty sure you need the VMS end set to other than 'fixed-512' ..
Internally VMS stores the records differently, but I dont think thats relevant here - its the FTP server's job to handle it ...
Sorry, not much help ...
[edit] - this link has some basic info - Ive cut out three possibly useful bits, below ...
http://saf.bio.caltech.edu/vms_sheet.html[^]
$ ANAL/RMS <filename> Determine the attributes and organization of a file.
$ SET FILE/ATTRIB=(ORG:SEQ,RFM:FIX,LRL:512,MRS:512) <filename>
Reset the file's attributes, do not reorganize its data.
This is used most often to patch up files retrieved via binary FTP.
$ HELP [command] Display the 'manual page' for command
[/Edit]
Garth
modified on Saturday, January 10, 2009 1:18 AM
|
|
|
|
|
Those would be FTP commands? I'll look into that.
BTW, the code I'm writing is replacing a java app that didn't appear to have to do any of that stuff. The code is at work, so I can't post the relevant bits until Monday.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
No, they are vms dcl commands -
the equiv of a dos shell/console session I guess
(You may be able to use ftp 'site' if its implemented in openvms ftp server - I doubt it)
.. Sorry bout formatting of this msg - I'm reading/replying from a crackberry Bold
|
|
|
|
|
That's not possible, then. I have to be able to just upload the file and have it be correct.
The code I wrote is replacing a java app that appeared to be able to just upload the file. In fact, the java app was able to call the CHDIR FTP command using the virtual folder name ("MY_FOLDER_001") defined in OpenVMS, while I had to use the this as my default folder: "MY_VOLUME:[MY_FOLDER.001]". Until I did that, I couldn't even transfer the file. I wonder why Java can do it, but C#/.Net can't...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Java can do it, but C#/.Net can't...
its odd .. looking at their code they are obviously familiar with OS400, Unix AND VMS, yet you're having issues
as an aside, while I know you're doing it in C#/.NET, I wonder if there's any point to testing their free java client code or one of their commercial .NET products (they seem to have 'trials') as well
hopefully they will see your post to their forum and answer it soon - if you were using the free .NET version with a view to buying the commercial version, I could give them a call for you given they are in the same country - in my second home actually, Brisbane - but my guess is you dont want the commercial version
'g'
|
|
|
|
|
this might help too http://64.223.189.234/node/302[^] (a link to a page at Hoffman Labs " OpenVMS Tips: Portable Sequential File Formats; FTP ASCII Transfers and RMS Files"
'g'
|
|
|
|
|
Many thanks.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
I apologize if this question is in the wrong place.
I inherited a C# windows service from a previous developer but I am having some trouble with his code. It is a windows service that can have classes loaded into it without having to recompile the service. I am assuming this is done by the windowsservice.exe.config file, specifically the
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="currencyworker" culture="neutral" publicKeyToken="null"/>
<codeBase version="1.1.0.0" href="currencyworker.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
A second config file gives the name of the class and its namespace. The windows service takes that info and uses the Type.GetType(typeName); function on it and then instantiates it. The problem I am having is that the .GetType function keeps returning null when I start the service leading me to believe that my syntax or something else is wrong with the windowsservice.exe.config file and that the class(currencyworker.currency in my case) is not being loaded. I have gotten it to work before but its rather random and not consistent so I can't seem to locate what is going wrong. Any help on this would be great, my understanding of this is not high so I am sorry if this doesn't make sense or is confusing.
|
|
|
|
|
|
A Type name in a configuration file should be case-sensitive and fully qualified. That means that you need the namespace and the assembly name of the assembly its contained within:
Name.Space.CurrencyWorker, Name.Space
Assuming that a type CurrencyWorker exists in assembly Name.Space.dll or Name.Space.exe.
|
|
|
|
|
hi
how to close all the running application like
word , notepad ,photoshop .....etc
and thanks
|
|
|
|
|
....
"Well, we're getting "F"'d at work. WPF, WCF, and WWF... WTF?" --John Simmons
|
|
|
|
|
abu rakan wrote: how to close all the running application like
word , notepad ,photoshop .....etc
Shut down windows. That will close all the applications - and in a very green environmentally friendly way that uses very little power.
|
|
|
|
|
thanks
but want make that witout shutdown XP
|
|
|
|
|
Over a month and you STILL can't figure this out? Nevermind searchin google, CP articles or even the message board would have given you the answer.
Ugh. I got so tired of this I gave up and coded it for you.
Here is the damn code.[^]
|
|
|
|
|
thank you
if you woudnot to replay
dont replay
i didnot ask you
|
|
|
|
|
blank[] blanklist = blank.Getblank();
foreach(blank theblank in blanklist)
{
theblank.blank();
}
If you can't figure it out, then go stupid business or some crap.
|
|
|
|
|
When you ask the same question over and over, when you have already been given the solution or told to Google an easier type of question you are going to get flamed. Now, if you want to be rude in your replies NO ONE WILL EVER HELP YOU AGAIN.
Do you understand this?
"Well, we're getting "F"'d at work. WPF, WCF, and WWF... WTF?" --John Simmons
|
|
|
|
|
Windows doesn't have a utility to do this. You'll have to be a programmer and write one.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I'll probably get flamed for this, but I'm responding in the hope that you'll then go away.
What you want to do shouldn't be done - it's not your computer it's the users. They get to decide when their open applications should close. (Hint to possible solution later)
You've previosly asked about stopping running processes - again, you should not do this for the above reasons, plus some may be important to the system and could potentially hang the system totally if stopped.
You've also asked about stopping Explorer. The only valid reasons to do this are if Explorer has crashed in which case your C# program will not be accessible until it's restarted, or if you're writing your own shell - which can't be done in C#.
So - don't attempt to do any of these.
The first however may be acheivable using FindWindow and DestroyWindow from user32.dll. Have a look on pinvoke.net for more info.
Now stop asking the same/rephrased question - do some coding and post back only with specific problems in your code.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
|
I am using C# 2008 express. When I do a textBox.Text.Length it does not count escape sequence characters in the string ex."\r\n" has length of 2 instead of 4. I am trying to have a console window show what line of a file I am sending, I use the Text.Remove command to remove the previous string that displays the last count, and append the new string that show the current count.
Ex..
textBoxConsole.Text = "Sending File....\r\n";
int len = textBoxConsole.Text.Length;
for (int i = 0; i <= 3; i++)
{
textBoxConsole.Text.Remove(len - 1);
textBoxConsole.AppendText("Line 1 of 3");
}
The above code will produce the following string:
"Sending File....\rLine 1 of 3"
The "\n" is cut off because the length was not correct. If there is more text above this more characters will be cut off because of ignored "\"s.
If anybody has a better way to do this please let me know.
Thanks!
|
|
|
|
|
Escape sequences like \r and \n are for the programmer and are converted to their proper one character representation (0x0d and 0x0a, in this case). If you want the length of the string, then assign the string to an intermediate variable first and get the length from that.
string message = "Sending File....\r\n";
int len = message.length;
textBoxConsole.Text = message;
for (int i = 0; i <= 3; i++)
{
textBoxConsole.AppendText("Line 1 of 3");
}
Hope this helps!
Jon
|
|
|
|
|
Thanks for the reply.
When I run your code the length of message is reported as 18, not 20. If I put another "\r\n" at the end of the string and it is reported as 20 not 24. Ignoring all "\"s in the string.
I need this so I know what position I am in the string so I can remove the previous string "Line 1 of 3" and replace it with the new string "Line 1 of 2". While keeping any text already in the console. I am sending thousands of lines so I can't append them into the console.
I tried to copy the textbox.Text to a string and get the length, same results.
Thanks!
|
|
|
|
|
asquaredtech wrote: When I run your code the length of message is reported as 18, not 20. If I put another "\r\n" at the end of the string and it is reported as 20 not 24. Ignoring all "\"s in the string.
It isn't ignoring the slashes. The slashes indicate the start of an escape sequence. The slashes are interpreted by the compiler as if to say this and the next character represent something other than what is displayed in the source code.
In other words, treat the "n" in "\n" as the new line character rather than as an "n".
"\t" is the representation of the tab character (singluar) becuase it is difficult to represent that in code.
"\r\n" represent the character pair carriage return and newline. Although you put four characters in the source code, there are only two character actually generated in the compiled output.
If you do actually need to represent a slash character in a string in your source code then use "\\".
asquaredtech wrote: I need this so I know what position I am in the string so I can remove the previous string "Line 1 of 3" and replace it with the new string "Line 1 of 2". While keeping any text already in the console. I am sending thousands of lines so I can't append them into the console.
One thing you could do is this. If you are displaying this on the Console , use Console.Write and finish your string with "\r" which is a carriage return. Without the newline that normally comes with it, it will return you to the start of the current line. You then overwrite the text that already exists on that line.
Many console applications use this technique when displaying progress status.
|
|
|
|