how do i issue a lp command from forms. [message #262707] |
Tue, 28 August 2007 02:02  |
harshalonline22
Messages: 74 Registered: March 2007 Location: Pune
|
Member |
|
|
I want print a list file which is stored in unix directory.
my O.S. is XP.
When i run a forms which calls sql by host.
i spool the result on my local m/c's C: drive
and i also ftp that file to unix.
now i want to print that file from forms only instead of
going to unix directory & type lp command.
Can any body tell me.
|
|
|
|
|
Re: how do i issue a lp command from forms. [message #263342 is a reply to message #263123] |
Wed, 29 August 2007 14:53   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I'm terribly sorry; if I had carefully read your initial post, I'd see that you already used HOST command.
LP is used to ... what? Print a file on a line printer? I guess that's why you are using telnet (BTW, don't use real IP address when posting on public forums - it can be abused. I'll remove it from your post). I wouldn't know whether it is possible to send credentials (as you can with FTP, for example) to automatically open a telnet session. Even if it was possible, wouldn't it imply security problem?
Also, once telnet session is established, it would require end user to know how to use LP command. Do your user know how to do that? It must be a *huge* print file if you want to print it there instead of a locally connected printer; shouldn't that be maintained by an operator (someone has to insert correct paper, etc.)?
The question is: could you automatically use HOST to say something like "LP from Windows XP to UNIX"? I don't know, sorry.
Phew ... so many words, and - at the end - I have no idea how to help you. I'm completely useless.
|
|
|
|
Re: how do i issue a lp command from forms. [message #263474 is a reply to message #263392] |
Thu, 30 August 2007 02:31   |
harshalonline22
Messages: 74 Registered: March 2007 Location: Pune
|
Member |
|
|
Littlefoot sir,
LP is unix command to print the document.And IP add was not an original.I just typed it.
Let me tell you the complete scenario.
1)
I am running a form ,for eg. suppose abc.fmb from my local machine (O.S. is Xp and forms 6i) which calls the sql script.
The SQL script is stored on n/w machin and i called it by this
syntax :
host('sqlplus -s scott/tiger@xyz @\\nwmachine\sql\mgr '||:yymm,no_hide);
2)
The sql script runs successfully.And spools the output file on my machine's C drive.I also ftp that o/p file from form itself by puttin the following syntax :
host('ftp.exe -i -s:\\nwmachine\sql\mgr.txt xxx.x.xxx.x',no_hide);
3)
The mgr.txt contains the mput command of that file to unix directory.
4)
This step also runs successfully
5)
now comes the printing part.
What we do that, we exit from form abc.fmb
Then, i now manually go to unix.Then i have to go to that directory.
Then i issue the lp mgr.lst command from the unix(SCO-UNIX) promt.
Instead of doing step 5 manually,i am trying to accomplish it from form 6i.
So do you think its possible.
when i am trying to connect to unix by using this command
host('telnet xxx.x.xxx.xx')
it asks the user name and passwd.
can we give user name & passwd in host command when telnet.
and other is that , can we also give a lp command from form 6i .
Thanx n Regards,
Harshal
|
|
|
|
|
|
|