Read command

hi all,
i am looping over an internal table.
in that loop i am reading another table like this
loop at itab1 into wa1.
read table itab into wa  with key aufnr > wa1-order1
                                               aufnr < wa1-order2.
endloop.
BUT the problem is in read statement it doesnt allow greater and less signs( >) (<)
how can i suffice this needcan anybody help?
urgent

HI,
I HAVENT STARTED THE CODING YET .
but i will tell u the requirement
there is a database table having three fields order_from(aufnr) order_to(aufnr) and order_type(char1).
there are only three records in this table.
now i a have an internal table where in i have a field named aufnr.
now i need to compare this aufnr with order_from and order_to.
remember this aufnr should be greater than order_from value and less than ordr_to.
how will i do this

Similar Messages

  • Card is in the GlobalPlatform card life cycle OP_READY ,the READ command?

    I have alreay finshed the pre-personalization procedure,but I do the READ command:
    /send C0B0036EFF
    => C0 B0 03 6E FF ...n.
    (35167 usec)
    <= 6E 00 n.
    Status: CLA value not supported
    what error?
    And what can I do?
    I learn the card at the first time

    What READ command are you trying to execute? Is this something you expect the card manager to respond to or a specific applet on the card? Can you provide the full APDU trace of the session?
    Shane

  • Unwanted record is coming even after filtering through read command

    Hi All,
    I am fetching vbeln matnr fkimg brewand netwar from vbrp and kdmat erdat from lips. i am reading data as:-
    READ TABLE IT_lips WITH KEY VBELN = WA_VBRP-VGBEL MATNR = WA_VBRP-MATNR INTO WA_lips BINARY SEARCH.
    In this case data should filter according to read command ,but 1 record which exist with vbeln and matnr in vbrp and no corresponding record is there in lips is also coming in my final output.
    This is happening when i am giving a particular customer code in my selection screen.
    Is anyone have idea about this problem.
    Thanks ansd Regards,
    Ranu

    >
    ranu sharma wrote:
    >
    >
    >     CLEAR: wa_vbrK, WA_LIKN, WA_MALI, WA_VBPA,WA_LFA1,
    > WA_J_1IEXCHDR .
    >
    > .......
    > ........
    >
    > READ TABLE IT_MALI WITH KEY VBELN  = WA_VBRP-VGBEL MATNR = WA_VBRP-MATNR INTO WA_MALI BINARY SEARCH.
    >
    >       IF SY-SUBRC = 0.
    >
    >   IF WA_MALI-VBELN = WA_VBRP-VGBEL AND WA_MALI-MATNR = WA_VBRP-MATNR.
    >         WA_FINAL-MATNR = WA_MALI-MATNR.
    >          WA_FINAL-MATKL = WA_MALI-MATKL.
    >         WA_FINAL-ERDAT1 = WA_MALI-ERDAT.
    >         WA_FINAL-MTART = WA_MALI-MTART.
    >         WA_FINAL-TEXT_LIPS_MAKTX = WA_MALI-MAKTX.
    >         WA_FINAL-KDMAT = WA_MALI-KDMAT.
    >    ENDIF.
    >
    >   ENDIF.
    > ....
    > ....
    > enloop
    Hi Ranu,
    As I said in my earliar Post...
    You must be forgetting to clear the work area after appending or modifying ...
    Please clear  WA_FINAL  after it's processing is over for each record inside LOOP AT IT_VBRP INTO WA_VBRP...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Wmii: plan9 installed, but no 'read' command

    I get the xmessage window from wmii-3.6 saying I have a plan9 installation, but there is no 'read' command.
    I searched for an answer, but I couldn't find anything.  Does anybody here have the same problem, or know
    how to fix it?

    You need to have /usr/local/plan9/bin or equivalent in your PATH.

  • Tell ma abt read command with eg.

    abt read command in abap

    hi
    good
    To read a single line of any table, use the statement:
    READ TABLE <itab> <key> <result>.
    For the statement to be valid for any kind of table, you must specify the entry using the key and not the index. You specify the key in the <key> part of the statement. The <result> part can specify a further processing option for the line that is retrieved.
    If the system finds an entry, it sets SY-SUBRC to zero, if not, it takes the value 4, as long as it is not influenced by one of the possible additions. If the internal table is an index table, SY-TABIX is set to the index of the line retrieved. If the table has a non-unique key and there are duplicate entries, the first entry is read.
    Using the Table Key
    To use the table key of <itab> as a search key, enter <key> as follows:
    READ TABLE <itab> FROM <wa> <result>.
    or as follows
    READ TABLE <itab> WITH TABLE KEY <k1> = <f 1> ... <k n> = <f n> <result>.
    In the first case, <wa> must be a work area compatible with the line type of <itab>. The values of the key fields are taken from the corresponding components of the work area.
    In the second case, you have to supply the values of each key field explicitly. If you do not know the name of one of the key fields until runtime, you can specify it as the content of a field <n i > using the form (<n i >) = <f i >. If the data types of <f i > are not compatible with the key fields, the system converts them.
    The system searches for the relevant lines as follows:
    Standard tables
    Linear search, where the runtime is in linear relation to the number of table entries.
    Sorted tables
    Binary search, where the runtime is in logarithmic relation to the number of table entries.
    Hashed tables
    The entry is found using the hash algorithm of the internal table. The runtime is independent of the number of table entries.
    Using a Different Search Key
    To use a key other than the table key as a search key, enter <key> as follows:
    READ TABLE <itab> WITH KEY = <f> <result>.
    or as follows
    READ TABLE <itab> WITH KEY <k1> = <f1> ... <k n> = <f n> <result>.
    In the first case, the whole line of the internal table is used as the search key. The contents of the entire table line are compared with the contents of field <f>. If <f> is not compatible with the line type of the table, the value is converted into the line type. The search key allows you to find entries in internal tables that do not have a structured line type, that is, where the line is a single field or an internal table type.
    In the second case, the search key can consist of any of the table fields <k 1 >...<k n >. If you do not know the name of one of the components until runtime, you can specify it as the content of a field <n i > using the form (<n i >) = <f i >. If <n i > is empty when the statement is executed, the search field is ignored. If the data types of <f i > are not compatible with the components in the internal table, the system converts them. You can restrict the search to partial fields by specifying offset and length.
    The search is linear for all table types. The runtime is in linear relation to the number of table lines.
    Specifying the Extra Processing Option
    You can specify an option that specifies what the system does with the table entry that it finds.
    Using a Work Area
    You can write the table entry read from the table into a work area by specifying <result> as follows:
    READ TABLE <itab> <key> INTO <wa> [COMPARING <f1> <f 2> ...
                                                 |ALL FIELDS]
                                      [TRANSPORTING <f1> <f 2> ...
                                                     |ALL FIELDS
                                                    |NO FIELDS].
    If you do not use the additions COMPARING or TRANSPORTING, the contents of the table line must be convertible into the data type of the work area <wa>. If you specify COMPARING or TRANSPORTING, the line type and work area must be compatible. You should always use a work area that is compatible with the line type of the relevant internal table.
    If you use the COMPARING addition, the specified table fields <f i > of the structured line type are compared with the corresponding fields of the work area before being transported. If you use the ALL FIELDS option, the system compares all components. If the system finds an entry with the specified key <key> and if the contents of the compared fields are the same, SY-SUBRC is set to 0. If the contents of the compared fields are not the same, it returns the value 2. If the system cannot find an entry, SY-SUBRC is set to 4. If the system finds an entry, it copies it into the target work area regardless of the result of the comparison.
    If you use the TRANSPORTING addition, you can specify the table fields of the structured line type that you want to transport into the work area. If you specify ALL FIELDS without TRANSPORTING, the contents of all of the fields are transported. If you specify NO FIELDS, no fields are transported. In the latter case, the READ statement only fills the system fields SY-SUBRC and SY-TABIX. Specifying the work area <wa> with TRANSPORTING NO FIELDS is unnecessary, and should be omitted.
    In both additions, you can specify a field <f i > dynamically as the contents of a field <n i > in the form (<n i >). If <n i > is empty when the statement is executed, it is ignored. You can restrict the search to partial fields by specifying offset and length.
    Using a Field Symbol
    You can assign the table entry read from the table to a field symbol by specifying <result> as follows:
    READ TABLE <itab> <key> ASSIGNING <FS>.
    After the READ statement, the field symbol points to the table line. If the line type is structured, you should specify the same type for the field symbol when you declare it. This allows you to address the components of the field symbol. If you cannot specify the type statically, you must use further field symbols and the technique of assigning components of structures to address the components of the structure.
    For further information about assigning table lines to field symbols, refer to Access Using Field Symbols.
    Examples
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
    DO 4 TIMES.
      LINE-COL1 = SY-INDEX.
      LINE-COL2 = SY-INDEX ** 2.
    INSERT LINE INTO TABLE ITAB.
    ENDDO.
    LINE-COL1 = 2. LINE-COL2 = 3.
    READ TABLE ITAB FROM LINE INTO LINE COMPARING COL2.
    WRITE: 'SY-SUBRC =', SY-SUBRC.
    SKIP.
    WRITE: / LINE-COL1, LINE-COL2.
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
    thanks
    mrutyun^

  • Comedi read command and acquire waveforms VIs

    I am wondering about the implementation of the comedi read command in the VIs I got from the NI site.
    One of the VIs is called "acquire waveforms" which calls "comedi read". everything seems to be working fine, but I am very curious about a small part of the comedi read VI.
    If you look closely at it, you will see that after reading in the samples using the CIN that just calls read() , there is a formula node that basically asks the VI to save only the first half of the array. I am wondering why this would be so? Does it have to do with the way read() works?
    I tried changing the VI so that the all bytes from the read() call are entered into the "data" array. But when I do this, labview gets stuck.
    any ideas?

    Hello:
    This question belongs in the Measurement Hardware Driver Delvelopment Kit (DDK) Forum located here:
    http://exchange.ni.com/servlet/ProcessRequest?RHIV​EID=101&RPAGEID=8&RFORMNUMBER=3&RHIDETAG=TRUE&UCAT​EGORY_0=_321&UCATEGORY_S=0
    The Comedi driver set is supported by www.comedi.org but you might get some answers from the DDK Forum as well.
    Sincerely,
    Brooks B
    Applications Engineer

  • Displaying multiple analog input channels using DAQmx READ commands.

    I am using a NI USB-6009 module in a hydraulic load test stand.  I want to read multiple analog voltage inputs and display them on my front panel.  Using DAQmx commands or DAQ assistant, LabVIEW will only let you have one READ command for the analog inputs.  Can someone point me to an example or give me some ideas on being able to display at least 3 analog inputs?  Thanks.

    With the DAQ Assistant, when you get a list of 'Supported Physical Channels', look at the bottom of the window. It says "<Ctrl> or <Shift> click to select multiple channels. When you use the DAQmx Create Channel and have a physcial channel control/constant, click the little arrow on the right side of the control/constant, select browse and use the same <Ctrl> or <Shift> click technique. If you want to enter the channels manually, the format is Dev1/ai0:2 for consecutive or Dev1/ai0,Dev1ai3 non-consecutive channels.

  • When using GPIB hardware, do I need the exact driver[HP-​3478a] or can I use simple raw GPIB-read or 488.2-read commands to take measuremen​ts?

    If so, which would I use in order to take a reading from a lab instrument?
    GPIB-read or 488.2-read commands to take measurements?

    GPIB and 488.2 are the same thing, so the question if kind of moot. If you have a driver for the instrument then that's the best place to start, as it's quite likely to have been debugged and worked out. You can, however, code up your own communication. You would want to use VISA rather than the lower-level 488.2 commands, as this is the preferred API for programming. VISA is just a layer that sits on top of GPIB and allows you to write code so that you can communicate with a device via a serial or GPIB interface.
    You should take a look at the examples that ship with LabVIEW as there's a couple that do basic communication using VISA functions.

  • How to read Command Prompt?

    Hello!
    In my application i need to read information from Command Prompt. From other programmers i knew that method : System.in.read(); state for it. But I get the whole bunch of error messages from compiler.
    If you know concrete URL's or web sites where I can learn about this function, please reply to me.
    I will appreciate any help.
    Thank you in advance
    Michael

    System.in.read() throws a java.io.IOException. Did you put try/catch statement to catch this exception ?
        try {
            System.in.read();
        catch(java.io.IOException ioException) {}

  • Acrobat reader command line switch - password

    Hello everybody,
    I am a developer for macromedia director applications.
    I need to open a password protected PDF-file from within a
    director-projector-application with any suitable
    xtra-extension (not the
    problem discussed here!).
    all I would need is the complete command line for acrobat
    reader to do
    this.
    A complete list of command line switches for Acrobat Reader
    would be helpful
    in respect to further needs.
    where can i get this.
    By the way, the solution for Windows and Mac OS would be
    welcome. Are they
    the same?
    Thanks
    Peter Grambitter

    Hello everybody,
    I am a developer for macromedia director applications.
    I need to open a password protected PDF-file from within a
    director-projector-application with any suitable
    xtra-extension (not the
    problem discussed here!).
    all I would need is the complete command line for acrobat
    reader to do
    this.
    A complete list of command line switches for Acrobat Reader
    would be helpful
    in respect to further needs.
    where can i get this.
    By the way, the solution for Windows and Mac OS would be
    welcome. Are they
    the same?
    Thanks
    Peter Grambitter

  • Trying SSH CLI ,  reading command line method is infinte loop problem!

    I am trying excute command and reading result. but reading result part has problem.
    below source is a part of my method.
    try{
                   SessionChannelClient sessionChannel = ssh.openSessionChannel();
                   sessionChannel.startShell();
                   OutputStream out = sessionChannel.getOutputStream();
                   String cmd = s + "\n";
                   out.write(cmd.getBytes());
                   out.flush();
                   InputStream in = sessionChannel.getInputStream();
                   BufferedReader br = new BufferedReader(new InputStreamReader(in));
                   byte buffer[] = new byte[255];
                   String read= "";
                   while (true) {
                        String line = br.readLine();
                        if (line == null)
                             break;
                        str += line;
                        str += "\n";
                   System.out.print(str); //print result
                   sessionChannel.close();
                   in.close();
                   out.close();
              }catch(IOException ee){
                   System.out.println(ee);
              }finally{
                   System.out.println("=============end cmd=============");
    while loop has problem. While statement has infinite loop problem.
    why has this problem?
    anybody, help me please. Thanks for reading .
    Edited by: BreathAir on Aug 5, 2008 12:16 AM

    That loop will loop until readLine() returns null, which will only happen when the other end closes its end of the connection, and it will block while no data is available.

  • Read command line arguments with an ActiveX step

    Hi
    I would like to read the command line parameters from TestStand startup. I did find an ActiveX resulting in a Object Reference (See Locals.CommandsRef). How do I use this reference to really get the arguments and their count? See also screenshot.
    Solved!
    Go to Solution.
    Attachments:
    Screenshot.jpg ‏160 KB

    Hi Paulus,
    Via this link, you find an forumthread that describes the same issue. testStand does not support this, but there is a workaround. Attached you find the code.
    The attachment includes a LV vi with the command line. If you doen't use Labview, here is the command line:
    C:\Program Files (x86)\National Instruments\TestStand 2012\Bin\SeqEdit.exe /goto "Parameter1 = test" /runEntryPoint "Test UUTs" D:\Testsequence.seq
    Regards,
    Bas
    Attachments:
    Command line TestStand.zip ‏10 KB

  • Acrobat Reader command line problem

    In windows xp professional I'm programatically creating a batch file and executing it (shell command in visual basic) to convert pdf files to Microsoft xps.
    The batch command looks like this one:
    "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" /t "D:\MyDir\Microsoft XPS Document\x.pdf" "Microsoft XPS Document Writer" /t "D:\MyDir\Microsoft XPS Document\x.xps".
    When the user logged in on the machine is an administrator, acrobat reader does the operation silently. When a normal user (not belonging to administrators group) is logged in on the machine, acrobat reader opens the save as dialog window requiring user interaction.
    The normal user has full control over the destination directory. I already tested giving the normal user full control over AcroRd32.exe and over cmd.exe with no success. I also tried in visual basic 2008 executing the command through System.Diagnostics.Process.Start with the exact same curious results.
    Can someone help.
    Thank you.

    Hi.
    I couldn't find a solution within Adobe for the problem I reported Oct 9, 2012, so I went to a fallback solution aimed to complete the needed stages. I'm posting here the visual basic 2008 code I wrote then. It is not a graceful solution and has some coarse code but was designed as part of an application that must keep processing files without user intervention. The procedure "followAcroRd32PDFtoXPS" must be called after the execution of a batch command like the described in the previous post:
    Module fallback
        Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
        Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hwndParent As Integer, ByVal hwndChildAfter As Integer, ByVal lpszClass As String, ByVal lpszWindow As String) As Integer
        Declare Function GetDlgCtrlID Lib "user32" (ByVal hDlg As Integer) As Integer
        Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (ByVal hDlg As Integer, ByVal nIDDlgItem As Integer, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Integer
        Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
        Const WM_SETTEXT = &HC
        Const BM_CLICK = &HF5
        Function FileInUse(ByVal filepath As String) As Boolean
            Dim f001 As Integer
            If System.IO.File.Exists(filepath) Then
                Try
                    f001 = FreeFile()
                    FileOpen(f001, filepath, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.LockReadWrite)
                    FileClose(f001)
                Catch
                    Return True
                End Try
            End If
        End Function
        'outpfile <-- path to the XPS Document to be created
        'starttime <-- system date and time when the batch command line was executed
        Sub followAcroRd32PDFtoXPS(ByVal outpfile As String, ByVal starttime As System.DateTime)
            Dim p As System.Diagnostics.Process, q As System.Diagnostics.Process, proc() As System.Diagnostics.Process
            Dim i As Integer, j As Integer
            Dim l As Long, memusage() As Long
            Dim t000 As System.DateTime
            Dim t999 As System.DateTime
            Dim hwnd As Integer, lObjhWndTB As Integer, lObjhWndBu As Integer
            Dim nIDDlgItem As Integer
            Dim resu As Integer
            dim maximumacrobatwaittime = 60 'seconds
            dim memoryusageinactivity = 12 'seconds
            dim acrord32pdftoxpstimelimit = 12 'seconds
            'Identify necessary Adobe Reader process
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                i = 0
                For Each p In System.Diagnostics.Process.GetProcesses
                    If LCase(p.ProcessName) = LCase("AcroRd32") Then
                        If Not p.StartTime < starttime Then
                            ReDim Preserve proc(i)
                            proc(i) = p
                            i = i + 1
                        End If
                    End If
                Next
                If i > 0 Then Exit Do
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > maximumacrobatwaittime Then
                    Exit Sub
                End If
            Loop
            'Identify necessary window
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                hwnd = FindWindow(vbNullString, "Save the file as")
                If hwnd <> 0 Then
                    Exit Do
                End If
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > maximumacrobatwaittime Then
                    Exit Sub
                End If
            Loop
            'Send click message to button save
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                lObjhWndTB = FindWindowEx(hwnd, 0, "ComboBoxEx32", "")
                If Not lObjhWndTB = 0 Then
                    nIDDlgItem = GetDlgCtrlID(lObjhWndTB)
                    resu = SendDlgItemMessage(hwnd, nIDDlgItem, WM_SETTEXT, 0, outpfile)
                    If resu > 0 Then
                        lObjhWndBu = FindWindowEx(hwnd, 0, "Button", "&Save")
                        If Not lObjhWndBu = 0 Then
                            resu = PostMessage(lObjhWndBu, BM_CLICK, 0, 0)
                            If Not resu = 0 Then
                                Exit Do
                            End If
                        End If
                    End If
                End If
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > maximumacrobatwaittime Then
                    Exit Sub
                End If
            Loop
            'Adobe Reader eventually will enter inactivity after printing to XPS Document
            ReDim memusage(0)
            Do
                System.Threading.Thread.Sleep(1000)
                ReDim Preserve memusage(UBound(memusage) + 1)
                For Each p In proc
                    p.Refresh()
                    memusage(UBound(memusage)) = memusage(UBound(memusage)) + p.WorkingSet64
                Next
                If Not UBound(memusage) < memoryusageinactivity Then
                    j = 0
                    l = memusage(UBound(memusage))
                    For i = UBound(memusage) - 1 To UBound(memusage) - memoryusageinactivity + 1 Step -1
                        If l = memusage(i) Then j = j + 1
                    Next
                    Select Case j
                        Case memoryusageinactivity - 1
                            Exit Do
                        Case Else
                    End Select
                End If
            Loop
            'Wait for the new XPS Document
            t000 = DateTime.Now
            Do
                System.Threading.Thread.Sleep(1000)
                Select Case My.Computer.FileSystem.FileExists(outpfile)
                    Case True
                        If Not FileInUse(outpfile) Then Exit Do
                    Case Else
                End Select
                t999 = DateTime.Now
                If DateDiff(DateInterval.Second, t000, t999) > acrord32pdftoxpstimelimit Then
                    Exit Do
                End If
            Loop
            'Kill Adobe Reader process
            For Each p In proc
                p.Refresh()
                Try
                    p.Kill()
                Catch ex As Exception
                End Try
            Next
            'Kill eventual MS Windows error reporting system process
            For Each p In System.Diagnostics.Process.GetProcesses
                If LCase(p.ProcessName) = LCase("WerFault") Then
                    If LCase(p.MainWindowTitle) = LCase("Print driver host for 32bit applications") Then
                        For Each q In System.Diagnostics.Process.GetProcesses
                            If LCase(q.ProcessName) = LCase("splwow64") Then
                                Try
                                    q.Kill()
                                Catch ex As Exception
                                End Try
                            End If
                        Next
                        Try
                            p.Kill()
                        Catch ex As Exception
                        End Try
                    End If
                End If
            Next
        End Sub
    End Module

  • Sometimes GPIB controller did not command the instrument to talk while the high-level program did have "READ" command.

    GPIB controller should send "UNL", "LA0", "TAxx" to command the instrument to talk. Though the program do have the "READ?" query, sometimes GPIB controller didn't send the above commands from NI Spy, resulting in the system is hanging there. It happens randomly.

    HI,
    It is not clear to me what is going on. I'd like to get more information.
    Could you specify what programming language are you using?. Also, what functions are you using?. What driver version are you using?.
    Include any information you think might be helpful. Also, attach the Spy capture.
    DiegoF.

  • System("read") command

    Hello. I've got the following code in a program:
    printf("%s", "the text that I want to print to the console");
    system("read");
    The purpose here is to have the text from the printf( ) statement above print to the console, and then have the program pause and wait for the user to hit any key (note that scanf( ) or other input functions are not appropriate here for two reasons: first, the keys the user hits actually appear on the console, and I don't want them to, and second, the user can type many, many keys and the program will not continue until he or she hits Enter -- I want the program to simply pause until any key is hit). I knew that with C++ on Windows I used to be able to achieve this perfectly using system("Pause"), but I found that this did not work with C on the Mac. Thanks to help from RayNewb and Cohi in a previous thread, they explained that system( ) was a stdlib.h function that could easily be used in C, and that I just needed to find the Unix-equivalent of the "Pause" command (which was a DOS command, which is why it wasn't working on the Mac). Ray and Cohi came up with the following statement to replace the DOS-oriented system("Pause"):
    system( "read -n 1 -s -p "Press any key to continue..."; echo" );
    As you can see from the code at the very top of the post, I ended up shortening this statement to simply system("read") because I found that, for my purposes at least, it did the exact same thing as the longer version shown directly above. In either case, they were right about this command, and this statement did exactly what I wanted it to, except for one problem...
    Gievn the two statements at the top of the post, the expected result would be for the text from the printf( ) statement to print to the console, followed by a pause in the program waiting for a key to be hit, at which point the program would continue. This is exactly what happens, only backwards. The program starts off with a pause, waiting for any key to be hit, and when a key is hit, only then does the printf( ) statement run and the text appear on the console. This happens whether I use the short version of the "read" statement or the full version that Ray and Cohi came up with. Can anyone help explain this? Any help is greatly appreciated.

    Tron55555 wrote:
    I know the fprintf() function, but I thought it was only used to write to files
    Important plot point - everything is a file.
    What is it that allows "stdout" to be used in place of a file name in this function's argument? Since "stdout" is a pointer like you said, does that mean that any pointer could be used for the first argument in the fprintf() function, not just file pointers? How's that work?
    fprintf doesn't take a file name. It takes a "FILE *". You can create one of those with "fopen()" or you can use the pre-defined ones for standard input, output, and error. You can use any valid "FILE *" for the argument.
    Do you guys have any recommendation of which would be better (whether it would be better to use fflush(stdout) or fprintf(stderr, "") )? Is one of these solutions more appropriate than the other, or are they both the same in effect?
    Neither. Don't write command-line tools that depend on the terminal. fflush(stdout) is more tedious to use in the code, but more robust. Otherwise, you would have some of your output going to stdout and some of it going to stderr, which becomes a hassle. But it is only a hassle when you are dealing with command-line tools that are using the command line as an interface, and those things are always a hassle. It is better to stick to stdout and then you can more easily pipe the output of one program to the input of another. If you are going to break that functionality, you might as well write a real GUI. If you do your command-line tool correctly, you can easily write a GUI wrapper for it and have both GUI and good command-ilne functionality.
    I don't really know anything about this stuff, but you mentioned that it's generally a bad idea to write command-line apps that have dependencies on the Terminal. Do you know of any other way to achieve the type of pause I'm trying to achieve without using the Terminal?
    No. If you want to have a user interface, you have to interact. Unix was designed around the idea of a toolbox of simple programs that can be combined (piped) together to do clever things. You shouldn't have a requirement for terminal interaction. The basic functionality should be entirely driven by the command line so your tool could be easily used by other tools. If you really want an interface, add one, but require a "-i" flag to trigger interactive mode or maybe use "isatty()" to find out automatically (The "i" flag would be more robust though).
    Consider the shell itself. It is, by definition, an interactive program. Right? Wrong. It can be run non-interactively too. In fact, non-interactive behavior is the default.
    I've heard of them before, but don't know anything about them. If anyone has spare time, could you give me an explanation of what they do (doesn't have to be anything in detail -- just tyring to get some really basic idea of what they are, and what all the fuss over them is about). Thanks for your reply, eric.
    It is an easy to use library for (fully) interacting with the terminal. It was a bigger deal before everyone had graphical user interfaces. There are umpteen different kinds of terminals and configurations and curses knows them all. You can even do text windows. Still, it is "easier" than interacting with the terminal, but only because the terminal is so cryptic.
    Tron55555 wrote:
    P.S. -- on a separate note, can anyone tell me, when formatting a quote on these forums, how I can write who's quote is it? When the quote says, for example, "etresoft wrote..." -- how do I do that? I checked the Help section under How to Format Text, but it didn't have anything about quotes. Thanks.
    etresoft wrote:
    Just hit the "quotes" button and see how the forum does it.
    "Abraham Lincoln" wrote:
    Four score and seven years ago...

  • Read Command from Command Line

    Hi.
    I am starting my application using the following command at the command line: "java -jar convert.jar config.txt". Is there any way for me to read the "convert.jar" portion of the command.
    I am building a server side application that needs to restarted periodically. I get the invocation directory using System.getProperty("user.dir"). I need to know the name of the command so that I can execute something line
    "java -jar" + strCommand + System.getProperty("user.dir"), where strCommand is the command "convert.jar" or "/path/to/convert.jar"
    Thanks,
    Siddharth.

    am building a server side application that needs to restarted periodically.The OS has certainly a utility to periodically schedule an application (cron, at, scheduled tasks...)

Maybe you are looking for

  • LOV problem after deployment

    Hi, I have a weird problem. I just deployed my project and all went fine. However, when testing it, one ( and only one ) panel had its LOV buttons not working. When selecting one of those LOV buttons, the following error appears: "JBO-26080: Error wh

  • Workflow to change item/file permissions using a people column on the List/Library?

    SharePoint 2013 Online. I have a Document library with users that can only add new items permission by default. There is a new people column in that library I presume I can manually change perimssions on one item/file to let a user have full control

  • Elements getting disabled by default

    Hello I am creating a view with certain input fields and binding the same with one Value Node and value attributes. When I try to run the sample application all my input fields are input disabled. Infact I have noticed that if i bind my inputfield to

  • F110 - Email - Problem

    Hi guys, When we run the Payment run - F110 and take the hardcopy of payment advice and cheque an email is triggered and currently my client does not want the email, Please let me know where I can find the configuration for this. 1. I have checked th

  • Proximity sensor problem in x6!!!PLS help

    hey guys i got myself an x6 2 days...when i answer calls and try my best to cover the sensor wit my ear still i acciddently press the mute or hold button.....the keypad is supposed to switch off right???? it happens sometimes though its not reliable.