Standard input
This program will take file names on the command line and read the contents of each file in line by line. If a "-" (i.e., a hyphen) is specified for a file name, the program should use standard input for that file rather than opening a file called "-". For example,
sortit file1.txt - file3.txt
will sort all of the lines in file1.txt, standard input, and file3.txt.
could anyone elaborate on the standard input part.
System.in
Similar Messages
-
Choosing Unique Values Generically and add respective data in Standard Input
Hi,
I want to send the unique data by generic checking and adding respective other data in case of Standard (X12) Input 850 Message.
My Input :
ISA*00* 00 *ZZ*THEM *ZZ*US 991221*1226*U*00401*000000025*0*T
GS*PO*THEM*US*19991221*1226*1*X*004010
ST*850*0001
BEG*00*NE*3859199838**950727***IBM
PER*AA*Andrew Carlson*TE*(708) 555-2930
DTM*002*970523
PO1*1*93*BX*145.39**CB*KOW-20392-10
PID*F****Uninterruptible Power System
PER*AA*Camilla Anderson*TE*(708) 555-2011
PO1*2*25*EA*35.68**CB*ABX-2001
PID*F****High Volume Printer Stand
PER*AA*Miranda Cappelan*TE*(708) 555-1111
PO1*3*4*PC*2002.91**CB*ABX-2001
PID*F****Electronics Cabinet Package (56" High)
PO1*1*2*BX*145.39**CB*KOW-20392-10
PID*F****Uninterruptible Power System
PER*AA*Camilla Anderson*TE*(708) 555-2011
CTT*3
SE*14*0001
GE*1*1
IEA*1*000000025
My Expected Output :
<OrderFile>
<Order>
<Header>
<PODate>950727</PODate>
<PONumber>3859199838</PONumber>
</Header>
<LineItems>
<PONumber>KOW-20392-10</PONumber>
<Quantity>95</Quantity>
</LineItems>
<LineItems>
<PONumber>ABX-2001</PONumber>
<Quantity>29</Quantity>
</LineItems>
</Order>
</OrderFile>
Need mapping link / functoids / XSLT code for this standard input 850 message.
Need Urgently.
Thanks & Regards
Thanks & Best Regards, SiddharthHi John,
Actually I need to
put a unique check on PO1:07 element and need to add the respective PO1:02 element.
1st PO1:07 = KOW-20392-10
1st PO1:02 = 93
2nd PO1:07 = ABX-2001
2nd PO1:02 = 25
3rd PO1:07 = ABX-2001
3rd PO1:02 = 4
4th PO1:07 = KOW-20392-10
4th PO1:02 = 2
Then as PO1:07 for 1st and 4th are same, then in the output there should be one <LineItems> with <PONumber> as KOW-20392-10 and <Quantity> should be added as 93+2 = 95
Similarly as PO1:07 for 2nd and 3rd are same, then in the output there should be another <LineItems> with <PONumber> as ABX-2001 and <Quantity> should be added as 25+4 = 29
I want to use the XSLT code but as input is X12 850 standard structure I am not able use the XSLT properly.
It would be great if you can check the X12 4010 850 message standard structure and let us know how to implement this.
Thanks & Best Regards
Thanks & Best Regards, Siddharth -
Standard Input Help on a table column.
Hello,
Requirement is to provide a Standard Input Help on a Table Column in Web UI. The Context node is a Value node and that column should be in editable mode.
And how can I get standard search in Web UI that is available in GUI for searching the Transaction No. in T- Code CRMD_ORDER.
Pl. help.
Thanks & Regards
AnkitHi Ankit,
If you are asking about DDIC search help, then you need to use method GETV_XYZ of the context node attribute.
Have a look on below written code:
data:
ls_map type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING,
lt_inmap type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB,
lt_outmap type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB.
ls_map-context_attr = 'struct.countryorigin'.
ls_map-f4_attr = 'LAND1'. ( Search help Parameter, in your case it will be Transcation no.)
append ls_map to: lt_inmap, lt_outmap.
create object rv_valuehelp_descriptor type
CL_BSP_WD_VALUEHELP_F4DESCR
exporting
iv_help_id = 'H_T005_LAND'
iv_help_id_kind = IF_BSP_WD_VALUEHELP_F4DESCR=>HELP_ID_KIND_NAME
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
Regards,
Saurabh -
thanks
One suggestion is to write a batch (.bat) file that will call your executable. The batch file can contain all the standard inputs necessary to run the executable. Then, in LabVIEW, you can call the .bat file using the System Exec.vi.
As far as your second question, there is no slick way to do this LabVIEW. You would probably have to call Window API functions using the Call Library Function utility. There is a set of VI's that call some of the standard API functions but I don't think they have what you want.
http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&74DDE683A1AFF6988625683A000C0D73&cat=034E59A8530E09DF862568900018707A
Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect -
Java debugging - problems with standard input
Hi
I hope somebody can help me with this problem.
I'm developing a Java app that reads from the standard input. I use System.in.read() to do that. When I debug it, I use the Standard I/O window instead of the Run Log window to pass in values, but nothing happens (i.e. the line following the read() is never reached). I also tried to run the app and then attach the debugger to use the Run Log window as standard input, with the same result. If I add a breakpoint before the call to read(), the debugger pauses the execution, so I suppose the breakpoints are OK.
In the executable Info window, Debugging tab, I use the pseudo terminal with the Java debugger.
So my question is: how can I enter values from the standard input in debugging mode?I believe that you are seeing these problems because we have found the
current versions of RMI found in the JDK to be inherently unscalable -- we
do not listen for them. As you noticed, we recommend that you use our
packages for now, and then do the simple change that you found if you decide
that you do not like WLS. (If you do decide that you do not like us, please
definitely let us know why you chose the way you did!)
Thanks,
Michael
Michael Girdley
Product Manager, WebLogic Server & Express
BEA Systems Inc
"Tim Dawson" <[email protected]> wrote in message
news:397b8cc2$[email protected]..
We're developing a J2EE application on NT using WLS 5.1, SP3, but we don't
want to be tied to any particular J2EE server, so we're making sure that
none of our code is weblogic specific.
In keeping with this philosophy, I created an RMI service that used the
standard java.rmi.* imports instead of weblogic.rmi.* and used thestandard
RMIC compiler rather than the weblogic.rmic compiler.
Unfortunately, I couldn't get the system to work. I kept getting
"java.rmi.MarshalException: Error marshaling transport header; nested
exception is: java.io.EOFException" whenever I'd call Naming.lookup().
Of course, when I did the search & replace with java.rmi.* with
weblogic.rmi.*, and switched from the standard rmic to weblogic.rmic,
everything started working just fine. This is the ONLY change I made!
Has anyone else run into similar problems?
Tim Dawson
Sr. Software Architect
is.com -
Unix standard input/output
My issue is: how can I read from Unix standard input in Java when it is piped from another Unix program. For instance:
`cat foo.txt | java MyProgram ?????' . Should I follow this way or should I do in another way?
Thanks
puccio.not quite what you are looking for, but im thinking this will help http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
link supplied by NtQuest (many thanks)
mebby we should get a handy links page, i know of several that i keep posting and never remember to keep, so i gotta keep looking it up -
BR0255W Cannot read from standard input during a dbverify
Hello,
I am using:
BRBACKUP 7.20 (13)
SunOS 5.10 Generic_144488-06 sun4u
701 SAPSR3
Oracle 11.2.0,.2
brbackup -w only_dbv -t online -c -u / -e 16
It generally runs ok, but today I got:
BR0280I BRBACKUP time stamp: 2011-04-20 11.20.47
BR0063I 5 of 11 files processed - 14900.039 of 73640.086 MB done
BR0204I Percentage done: 20.23%, estimated end time: 12:45
BR0001I **********________________________________________
BR0280I BRBACKUP time stamp: 2011-04-20 11.21.44
BR0281W BRBACKUP interrupted by signal 2
BR0269W Wait situation interrupted - probably cannot continue
BR0280I BRBACKUP time stamp: 2011-04-20 11.21.44
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRBACKUP:
BR0280I BRBACKUP time stamp: 2011-04-20 11.21.45
BR0251W Function gets() failed at location BrConfEnter-1
BR0253W errno 5: I/O error
BR0255W Cannot read from standard input
BR0280I BRBACKUP time stamp: 2011-04-20 11.21.45
BR0261E BRBACKUP cancelled by signal 2
BR0056I End of database backup: befrzrsn.dbv 2011-04-20 11.21.46
BR0280I BRBACKUP time stamp: 2011-04-20 11.21.49
BR0054I BRBACKUP terminated with errors
1. Would you know what yould cause this Cannot read from standard input?
2. Is there a maximum number of process that can/should be passed to -e option?
Thanks in advance for your answer.Hello Benoît,
if I understood correctly, your brbackup was not started interactively, but in background, by crontab or DB13 or something like that.
As you perhaps know, signal 2 usually means that the process was interrupted by a ctrl-C from keyboard. This should not happen for a background process.
It could be that someone played around with kill command.
I rather suspect some resource bottleneck.
Could you please check Unix kernel parameters (or whatever their equivalent in SunOS is called - I am not familiar with it).
Or any suspicious entries in Unix log files?
regards -
Can send characters to the standard input while DOS Command is under execution
Can Labview send characters to the standard input while DOS Command is under running with System Exec.vi?
iftu wrote:
Found following VI's in ogpipe.llb under the ZIP file. Didn't find PING Example.vi
OGPIPE Write To Pipe__ogtk.vi
OGPIPE RefNum__ogtk.ctl
OGPIPE Read From Pipe__ogtk.vi
OGPIPE Open System Command__ogtk.vi
OGPIPE Open Pipe__ogtk.vi
OGPIPE Close Pipe__ogtk.vi
OGPIPE - VI TREE__ogtk.vi
PING Example is not in that archive. This is only the actual PIPE function library. What you want to do is using "OGPIPE Open System Command" to create the pipe handles for stdin and stdout and optinally stderr. Then use "OGPIPE Write To Pipe" to write to stdin and "OGPIPE Read From Pipe" to read from stdout and optionally stderr. When finished close each opened pipe handle with "OGPIPE Close Pipe".
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Passing BAPI standard Inputs using User inputs
Hi,
I have a requirement where i need to update SAP using an Adobe Interactive form.
I got a BAPI which can do this job.It worked fine with BAPI standard inputs...
But my requirement is to show something different in form and its corresponding value should be passed to BAPI.
Eg: I should provide a dropdown box which has A,B,C...etc if A is selected I should pass 100 as input value to BAPI and if B is selected in dropdown I should pass 200.
Along with this I should also pass few more standard inputs..
Any help is greatly apprecited.
FYI.. I developed this using JAVA Webdynpro .
Rgds
VaraHi,
For this do one thing .
Create a local attribute.
Craete a simple type.
Move to Enumeration and fill the Value & Description fields.
What ever you want to display in the dropdown give it in the "Description".
The value you want to pass to R/3 give it in "Value".
Now give the attribute type as the "Simple type" that is created by you
Now when ur passing data to R/3 do one thing.
Pass the data available in the local attribute to teh RFC import parameter.
Sorry i dont have any idea
On passing more data then this.
"Along with this I should also pass few more standard inputs"
Thanks & Regards,
Lokesh -
I'm having trouble using standard input inside JDB
Hello Java(R) community
The problem is:
I cannot read a stream of characters from the keyboard inside JDB. Just to set context I'm using:
jdk 1.3.1_01 with jdb version 99/06/11 under RedHat(R) Linux(R) 7.1
I've written the following code:
1:import java.io.*;
2:
3:public class Test {
4:
5: Reader reader = new InputStreamReader(System.in);
6: char[] buffer = new char[256];
7:
8: public void myRead() {
9:
10: System.out.print("Insert some text: ");
11: try {
12: reader.read(buffer);
13: }
14: catch (IOException e) {
15: System.out.println(e.getMessage());
16: }
17: System.out.println("You've inserted the following text: " + new String(buffer));
18: }
19:
20: public static void main(String[] args) {
21:
22: Test ref = new Test();
23: ref.myRead();
24: }
25:}
The above is compiled with javac -g Test.java
At the shell you run ' java Test ' and it just echoes the input you give to it
Inside jdb you set a breakpoint with ' stop in Test.myRead()'. When there, it stops at line 10; you invoke the 'next' command and it just don't print the message (just becuse it's not a println it just don't flush I suppose); after that the next line to execute is 12; so you invoke 'next' again and the real problem happens! Nothing can be read from the standard input. If you try to run the 'list' command jdb says "Current thread isn't suspended".
Does anyone knows what's going on?
Thanks in advance for a reply.If you use the launching connector to start the debugee,
(this is the default used when you start jdb)
then jdb cannot tell the difference between jdb commands
that you are typing, and other text you want sent to the
debugee program. You will have the same problem with
output going the other way. The debugee program output
will be mixed in with any jdb output that comes along.
This is because the controlling window has only one stdin,
stdout, stderr that both processes (as well as anything else
you are running in that window) are forced to share.
You need to separate the debugger and debugee, as follows:
1) Start the debugee program (HelloWorld in this example)
in one command window:
% java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=4571 HelloWorld
2) In another window, attach your debugger (jdb in this example)
to the debugee via a socket:
% jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=4571
You may also use the shared memory transport if you are
on a win32 platform, as follows:
1) In one command window:
% java -Xdebug -Xrunjdwp:transport=dt_shmem,server=y,address=mine HelloWorld
2) In a second command window (again using jdb as an example):
% jdb -connect com.sun.jdi.SharedMemoryAttach:name=mine
For more information, refer to "Connection and Invocation Details"
at this URL:
http://java.sun.com/j2se/1.4/docs/guide/jpda/conninv.html -
How to Read from Standard Input?
Hi,
I am new to Java. Been reading the tutorial, but still unable to find How to read from standard Input.
Can anyone help? Thanks.
Here is my simple & error code:
public class test
public static void main(String[] args)
char filename[];
int i=0;
System.out.print("Type in a filename to read: ");
while ( System.in(filename) != -1 )
i++;
System.out.print(filename);
RPimport java.io.*;
public class forum{
public static void main(String args[]) throws IOException
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String input = "";
do
try
System.out.println("Enter command: ");
input = br.readLine();
catch ( IOException io ) {}
} while (!input.equals("exit"));
[code\]
package to import is java.io.*; -
Set up standard input in solaris to avoid 256 characters limit.
I do hava a Console command line application in java, the application run in Solaris. I run the program in a ksh script and the maxumin line size i can read is 256 characters. How can i set up the standard input to avoid this limitation. I need no limit in the input command line as can have command longer that 5000 characters.
How to reproduce the scenario.
public static void main(String[] args)
System.in.read()
Is there any way i can set up or initialize the standard input to avoid this limitation?
Thanks in advance.This is a limitation of the terminal driver, so even if the shell can accept more characters, the terminal in front of the shell will stick to the limit defined by MAX_CANON. There are two ways to get around this problem:
1. Put the terminal into raw mode: "stty raw -echo"
or
2. Introduce explicit backslash-newline sequences into the input stream. The terminal will trigger on the newline, but the backslash will tell the shell to keep looking for the logical end of the input. -
Dialog programming: making standard input field sensitive to double-click
Hello,
I'd like make standard input field sensitive to double-click. I know that I should register double-click event to input field class and write handler. But I can't find out from what class I should derive. What is class of standard input field? Can I derive from that class? Or is there another way to accomplish my requirements?
Best regards,
Josef MotlI agree with Kinshuk, Not sure why you need this functionality. Please implement this sample program do F4 help on the BURKS field and select a company code. Notice that is populates all the rest of the fields. Is this the functionality that you require?
report zrich_0002 .
parameters: p_bukrs type t001-bukrs,
p_butxt type t001-butxt,
p_ort01 type t001-ort01,
p_land1 type t001-land1.
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
read table return with key fieldname = 'P_BUKRS'.
* Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
* Get the company code from db and add to dynpro
data: xt001 type t001.
clear xt001.
select single * into xt001
from t001
where bukrs = return-fieldval.
dynfields-fieldname = 'P_BUTXT'.
dynfields-fieldvalue = xt001-butxt.
append dynfields.
dynfields-fieldname = 'P_ORT01'.
dynfields-fieldvalue = xt001-ort01.
append dynfields.
dynfields-fieldname = 'P_LAND1'.
dynfields-fieldvalue = xt001-land1.
append dynfields.
* Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.
Regards,
Rich Heilman -
BRGUI: Connect WindowsXP to AIX: BR0255E Cannot read from standard input
Hi,
I configure brgui.properties and seam everything ok:
brgui.remote-0=D11 (rsh aixd11 -l orad11)
It connect to server, but in the footer of 2nd BRGUI screen (after login screen) it appears "Error: Cannot read from standard input" in red.
And some seconds later the application closes.
I see the log and it has the following:
BR0651I BRTOOLS 7.00 (16)
BR0280I BRTOOLS time stamp: 2008-04-15 16.30.10
BR0656I Choice menu 1 - please make a selection
BR*Tools main menu
1 = Instance management
2 - Space management
3 - Segment management
4 - Backup and database copy
5 - Restore and recovery
6 - Check and verification
7 - Database statistics
8 - Additional functions
9 - Exit program
Standard keys: c - cont, b - back, s - stop, r - refr, h - help
BR0662I Enter your choice:
BR0280I BRTOOLS time stamp: 2008-04-15 16.30.10
BR0255E Cannot read from standard input
BR0280I BRTOOLS time stamp: 2008-04-15 16.30.10
BR0654I BRTOOLS terminated with errors
Can anybody help? Maybe is it related with AIX files authorizations?
Thanks a lot!
RuiHi Rui,
Please take note on the following important points.
When you use the remote option, ensure that the environment on the
remote host is fully configured to use the BR*Tools, and that the remoteuser has the relevant database rights. You should also ensure that the
relevant environment files are actually called up during the remote
access.
and
In some cases, BrGui does not work with the Remote Shell rsh from from
Microsoft Windows XP Service Pack 2 or Microsoft Windows Server 2003
Service Pack 1. See Microsoft Support Article ID 896336. Microsoft
offers a hotfix for this purpose. As a workaround, use the rsh from the
previous Service Pack. This is located in the uninstall directory after
the Service Pack has been installed. You can also enter the complete
path in the relevant remote call.
Hope the above information helps. -
Redirect standard input from file to terminal
Is there any way to redirect standard input from file to terminal within the same program? That is, get data from a file then redirect standard input to make it interactive with the terminal?
BIJ001 wrote:
No, the stdin, stderr, stdout, and working directory are environmental variables that are set
when your process is launched, and they cannot be changed from within your java application.Can't they?
//java.lang.System
public static void setIn(InputStream in)
// Reassigns the "standard" input stream.
public static void setOut(PrintStream out)
// Reassigns the "standard" output stream.
public static void setErr(PrintStream err)
// Reassigns the "standard" error output stream.
Since:
JDK1.1
Duh, you're right. I researched this looking for a way to change the working directory and found that you could not change that after launch - for some reason I remembered it wrong as being the stderr, stdin, and stdout in addition.
Maybe you are looking for
-
In RoboHelp 11 Responsive HTML5, is it possible to have 2 different language outputs in one generated output file, similar to WebHelp where the use can select the language from a drop-down list? In Webhelp output you could create multiple Content cat
-
In our HR landscape, the functional team wants to synchronize the customization data down from Production to QAT to DEV. I saw message type CONDA2 - is that appropriate to transfer this data? Also, I ran into an article about using Solution Manager (
-
InDesign CS2 'Unlock' greyed out ?
I am using CS2 (v4.0.5/WinXP SP3) and wish to replace some .AI/.PDF objects with newer versions in an InDesign document that is a couple of years' old. I recall locking the objects, but find that the 'Unlock Position' option on the Object menu is gre
-
Help purchasing org, plants & company codes
Hi Gurus, I have the following scenario which need some advice and clarification from all of you. Plant A is assigned to company code A Plant B is assigned to company code B *Note that company code A and company code B are using different currency PO
-
How to influence automatic creation of Info record
Hi friends, I need to avoid copying of a field when an info record is automatically created after saving a PO. Can you advice a user exit to perform this? thanks Pavel