Input/Data Stream Help

I have a program that outputs text. I want to modify it to use a data
stream that can be read by another program. How do I go about this?
Are there any online guides where I can learn this? I have looked
around, but haven't found anything useful as of yet.
Thanks for any responses.
Ben.

I have a program that outputs text. I want to modify
it to use a data
stream that can be read by another program. How do I
go about this?Not at all. Using a data stream for text is a most inappropriate choice. Use print streams or buffered readers/writers.
Are there any online guides where I can learn this? Yes, it's called the API. It e.g. tells you what a DataOutputStream is good for.

Similar Messages

  • Help me about the input data

    I have a input data(.txt) in form of:
    0. 12,45,23
    1. 23,10,15,21
    2. 15,32,25
    3. 1,25,36
    how can I get the input stream such as
    for(i=2;i<=10;i++){
    for(j=0;j<i;j++){
    every line of input file that (the column_index mod i) =j
    for example i=2 j=0
    then i get the 0th and 2th column of input file
    i=2 j=1
    then i get the 1th and 3th column of input file
    Thx for help very much

    Review
    java.io.BufferedReader
    and
    java.util.StringTokenizer

  • What does the Merge Data Stream processor do when there are multiple input streams to it from the same reader?

    Hi,
    I have a process with a reader of master data that outputs 5 records that feeds simultaneously into 3 different lookup and return processors.
    Each lookup and return processor brings some data back from a detail table. There can be multiple details so I follow each lookup processor with a split records from array processor. Hence I end up with 3 'streams' of data. Stream 1 has 8 records, stream 2 has 5 records and stream 3 has 6 records.
    I join all these streams to a Merge Data Streams processor.
    I end up with 9 records so although the help for the Merge Data Streams processor says 'Merge Data Streams does not perform any transformation, matching, or merging of records' there is clearly some merging going on.
    What is the behaviour of the merge data streams processor in this scenario?
    I have added attributes and flags into each of the streams. How many records should I see and what values should the added attributes/flags have (some records show attributes/flags from all 3 streams whereas others show just those attributes/flags from one stream).
    I have developed a test case simply to understand what the processor is doing but it's not obvious and furthermore it's probably unwise to develop EDQ processes where the processor behaviour is not documented and guaranteed to remain consistent. What I am trying to achieve is to bring all of a person's (the master data) various details (assignments, employers, etc.) together so we can check the data (some rules require data from multiple details).
    Thanks, Nik

    Cheers Mike - and for the explanation of the terms.
    I think I understand now how it's supposed to work.
    What I'm finding however is that when I set a flag to Y at the beginning of a path (that includes a lookup and return and then split records from array processor) that flag is showing no (i.e. an empty) value in SOME of the records shown in the subsequent MDS processor (it's fine the very last split processor before we get to the MDS but then again there are fewer records in that split processor than the MDS).
    In my case there are obviously more records in the MDS processor than there were in the original reader (because the lookup and returns are configured to have unlimited maximum matches). As mentioned, the different paths return different numbers of  records before being combined in the MDS. Say a reader has 5 records and path 1 returns 8 records in total including a path-specific flag (flag1, set to Y) but path 2 (that again adds its own path-specific flag (flag2, set to Y) returns just 5 records (since nothing was added from the lookups) are you saying that flag2 would show as 'Y' for all 8 records shown in the MDS?
    Hopefully you would be able to see what I mean if you try to create a process like the one I've described (or I can upload a package).
    Re. the purpose of the separate paths approach it is simply to allow the visualisation ('showing the working' as Neil puts it) of the different checks being carried out by the process.
    This is considered one of the benefits of the tool over writing SQL queries (with outer joins, query criteria, etc.).
    Also, as mentioned I was following an example that Neil put together for us to ensure that we are doing things in a 'proper' and supported way.
    If we put all the lookups, etc. for all the checks into one datastream then it no longer becomes so understandable and the value of joining processors in a process over simply writing SQL becomes questionable; arguably the EDQ process in fact becomes less easy to understand than simply writing SQL.
    Also, to go down this route I will need to revise the (what was previously substantially working until I revised it) processes that I have already developed.
    Thanks, Nik

  • Need help in triggering the Data stream load  using process chain

    Hi Guru's
    is it possible to trigger a data stream load using process chain?
    Any help is highly appreciated.
    Thanks
    Indiran

    Hi Indiran and welcome aboard!
    Don't think this is possible. SAP BW & SAP SEM-BCS are rather independent systems. Though, BCS lives on top of BI-BW stack, it even may have master data different from those in BW.
    Process chains, AFAIK, is completely the BW's feature. Certainly, you may use PCc on BW side, loading ODS/DSO and cubes involved in BCS data model.
    The main con here is the lost transparency -- you don't control everything from the consolidation monitor.
    The pro side is also rather obvious for me. Since, very often there is a huge difference between data quality at the data source and in the BCS totals cube, I need to make a lot of data transformation. Not only some data calculations or cleaning, but also transformation of data model: key figure model -> account model. It's much more easier to do in BW, for me.
    I even call the ODS/cubes/routines involved in such transformation as intermediate layer, the layer between data source and SEM-BCS.
    And this layer lives rather independently from BCS.
    Hope this helps.

  • I am a new Mac owner. I downloaded a document off of Sharepoint but I cannot input data into it.I have Office Mac2011 and I did enable Macros.Thank you for your help.

    I am a new MacBook Pro owner. I have Microsoft Office: Mac2011 I downloaded a document from Sharepoint. I clicked on the document to open it.....I then clicked on Enable Macro and the document opens, but will not allow me to input data. Thank for any help.

    Hey TobynJ:
    Sharepoint will use your network username or password if it is setup that way, but I'm not talking talking about that.  I am talking about permissions to be able to write to the document, you might only have read rights and not write.

  • Error: No batch input data for screen SAPMZVKDIALOGDEMO 1000 Help Needed

    Hi Experts!
    I wrote a program for BDC. I am attaching the code herewith. When i am trying to process the session in SM35, i was getting the error: No batch input data for screen SAPMZVKDIALOGDEMO 1000. Can anyone please tell me, what am i doing wrong.
    Thanks.
    REPORT  zvkbdcdemo01.
    DATA: bdc_tab LIKE bdcdata OCCURS 6 WITH HEADER LINE.
    DATA: session LIKE apqi-groupid VALUE 'Session #1'.
    CALL FUNCTION 'BDC_OPEN_GROUP'
      EXPORTING
        client                    = sy-mandt
    *   DEST                      = FILLER8
        group                     = session
    *   HOLDDATE                  = FILLER8
    *   KEEP                      = FILLER1
        user                      = sy-uname
    *   RECORD                    = FILLER1
    *   PROG                      = SY-CPROG
    * IMPORTING
    *   QID                       =
    * EXCEPTIONS
    *   CLIENT_INVALID            = 1
    *   DESTINATION_INVALID       = 2
    *   GROUP_INVALID             = 3
    *   GROUP_IS_LOCKED           = 4
    *   HOLDDATE_INVALID          = 5
    *   INTERNAL_ERROR            = 6
    *   QUEUE_ERROR               = 7
    *   RUNNING                   = 8
    *   SYSTEM_LOCK_ERROR         = 9
    *   USER_INVALID              = 10
    *   OTHERS                    = 11
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    PERFORM fill_bdc_tab.
    CALL FUNCTION 'BDC_INSERT'
      EXPORTING
        tcode                  = 'ZVKTR001'
    *   POST_LOCAL             = NOVBLOCAL
    *   PRINTING               = NOPRINT
    *   SIMUBATCH              = ' '
    *   CTUPARAMS              = ' '
      TABLES
        dynprotab              = bdc_tab
    * EXCEPTIONS
    *   INTERNAL_ERROR         = 1
    *   NOT_OPEN               = 2
    *   QUEUE_ERROR            = 3
    *   TCODE_INVALID          = 4
    *   PRINTING_INVALID       = 5
    *   POSTING_INVALID        = 6
    *   OTHERS                 = 7
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    * EXCEPTIONS
    *   NOT_OPEN          = 1
    *   QUEUE_ERROR       = 2
    *   OTHERS            = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  fill_bdc_tab
    *       text
    FORM fill_bdc_tab.
      REFRESH bdc_tab.
      PERFORM populate_bdc_tab USING:
      '1' 'SAPMZVKDIALOGDEMO' '1000',
      ' ' 'SFLIGHT-CARRID' 'LH',
      ' ' 'SFLIGHT-CONNID' '0400',
      ' ' 'SFLIGHT-FLDATE' '07/07/2007',
      ' ' 'SFLIGHT-PRICE' '1982',
      ' ' 'SFLIGHT-CURRENCY' 'EUR',
      ' ' 'SFLIGHT-PLANETYPE' 'A310-300',
      ' ' 'BDC_OKCODE' 'CREA'.
    ENDFORM.                    "fill_bdc_tab
    *&      Form  POPULATE_BDC_TAB
    *       text
    *      -->FLAG       text
    *      -->VAR1       text
    *      -->VAR2       text
    FORM populate_bdc_tab USING flag var1 var2.
      CLEAR bdc_tab.
      IF flag = '1'.
        bdc_tab-program = var1.
        bdc_tab-dynpro = var2.
        bdc_tab-dynbegin = 'X'.
      ELSE.
        bdc_tab-fnam = var1.
        bdc_tab-fval = var2.
      ENDIF.
      APPEND bdc_tab.
    ENDFORM.                    "POPULATE_BDC_TAB

    This normally means that you are trying to insert data on a screen for which a particular field is not available.
    So check screen number, screen fields and report name. In case of screen fields, use F1, F9 (technical information), and check the name of the screen field for batch processing (all the way at th bottom of the pop-up). This can differ from actual name of the screen field.
    If all this is ok, try to create a recording of the transaction with SM37.

  • IOS7 Safari error Code: "invalid Input Data. No javascript allow." On payment by Credit cards. Pls help

    Its Not possible to make any payment by Credit Card. After filling in the Data Form and continuing to finish the payment an error window appears Witz the Text " invalid Input Data. No javascript allow..."  Orher Browsers are working well.
    How can i fix this Problem

    Its Not possible to make any payment by Credit Card. After filling in the Data Form and continuing to finish the payment an error window appears Witz the Text " invalid Input Data. No javascript allow..."  Orher Browsers are working well.
    How can i fix this Problem

  • Problems Reading SSL  server socket  data stream using readByte()

    Hi I'm trying to read an SSL server socket stream using readByte(). I need to use readByte() because my program acts an LDAP proxy (receives LDAP messages from an LDAP client then passes them onto an actual LDAP server. It works fine with normal LDAP data streams but once an SSL data stream is introduced, readByte just hangs! Here is my code.....
    help!!! anyone?... anyone?
    1. SSL Socket is first read into  " InputStream input"
    public void     run()
              Authorization     auth = new Authorization();
              try     {
                   InputStream     input     =     client.getInputStream();
                   while     (true)
                   {     StandLdapCommand command;
                        try
                             command = new StandLdapCommand(input);
                             Authorization     t = command.get_auth();
                             if (t != null )
                                  auth = t;
                        catch( SocketException e )
                        {     // If socket error, drop the connection
                             Message.Info( "Client connection closed: " + e );
                             close( e );
                             break;
                        catch( EOFException e )
                        {     // If socket error, drop the connection
                             Message.Info( "Client connection close: " + e );
                             close( e );
                             break;
                        catch( Exception e )
                             //Way too many of these to trace them!
                             Message.Error( "Command not processed due to exception");
                             close( e );
                                            break;
                                            //continue;
                        processor.processBefore(auth,     command);
                                    try
                                      Thread.sleep(40); //yield to other threads
                                    catch(InterruptedException ie) {}
              catch     (Exception e)
                   close(e);
    2 Then data is sent to an intermediate function 
    from this statement in the function above:   command = new StandLdapCommand(input);
         public StandLdapCommand(InputStream     in)     throws IOException
              message     =     LDAPMessage.receive(in);
              analyze();
    Then finally, the read function where it hangs at  "int tag = (int)din.readByte(); "
    public static LDAPMessage receive(InputStream is) throws IOException
        *  LDAP Message Format =
        *      1.  LBER_SEQUENCE                           --  1 byte
        *      2.  Length                                  --  variable length     = 3 + 4 + 5 ....
        *      3.  ID                                      --  variable length
        *      4.  LDAP_REQ_msg                            --  1 byte
        *      5.  Message specific structure              --  variable length
        DataInputStream din = new DataInputStream(is);
        int tag = public static LDAPMessage receive(InputStream is) throws IOException
        *  LDAP Message Format =
        *      1.  LBER_SEQUENCE                           --  1 byte
        *      2.  Length                                  --  variable length     = 3 + 4 + 5 ....
        *      3.  ID                                      --  variable length
        *      4.  LDAP_REQ_msg                            --  1 byte
        *      5.  Message specific structure              --  variable length
        DataInputStream din = new DataInputStream(is);
           int tag = (int)din.readByte();      // sequence tag// sequence tag
        ...

    I suspect you are actually getting an Exception and not tracing the cause properly and then doing a sleep and then getting another Exception. Never ever catch an exception without tracing what it actually is somewhere.
    Also I don't know what the sleep is supposed to be for. You will block in readByte() until something comes in, and that should be enough yielding for anybody. The sleep is just literally a waste of time.

  • SEM-BCS:Data Stream Upload

    Hi! All.
    I am facing an issue in Data Stream upload.....The Target field 0Company is 6 char. and the source field 0Company code is 4 char. in length....the system gives an error ...the value Target field exceeds source field..use info object with greater length.....however, upon mapping Company to another infoobject...with 6 char..used instead of 0comp-Code...the system returns yet
    another error that its not coming from source system or source system can't be determined i.e. the new info object.......
    I was thinking changing target field length to four...any work around this issue...If the target field is changed i.e. 0company what implications will it have or just changing the field in data model do the trick??
    Thanks for your input....
    Victor

    Hello Viktor,
    If i understood well your problem i faced the same thing in the past.
    When costumizing the load from data stream include the lenght to 4 characters or try to include an offset of 2.
    Hope is helps.
    If yes award points.
    Best regards,
    João Arvanas

  • How do you separate UDP data streams

    Hi.  I'm currently using LabVIEW 2013  to read in a UDP data stream (packet) that contains various parameters.  I am successful in receiving the UDP packet using the UDP Open and UDP Read vi.  On the data out of the UDP Read I have it running into the "Unflatten to String" function and the type I have created a cluster containing 32-bit floating point (Single Precision in LabVIEW) numeric constant, since that is the type of data I am receiving.  To be able to separate the different parameters coming in, I have created the same number of numeric constants blocks to equal the number of parameters.  Is there an easier way to separate the data from the UDP data out so that I don't have to create so many numeric constants to represent the same number of data I have coming in?  Sometimes we will way more than what is listed below.
    Any help will be appreciated.  Thank you in advanced
    Attachments:
    Example layout (Not actual).vi ‏11 KB

    If all the data is the same type, then you can wire an array as the datatype instead of a cluster. Set the "data includes array or string size" input to False (the default is True). The output will be an array, and you can index out the values you want.

  • NW 6.5 Restore error 20550 Invalid Data Stream

    Hi Guys,
    Trying to perform a restore using Yosemite Server Backup 8.9 and recieving the above error.
    out of 36GB 99% was restore correctly but 6000 files were missing with the above error.
    Anybody have any idea what invalid data stream means?
    Any help much appreciated
    Robbie

    Robbiecookie101,
    > Anybody have any idea what invalid data stream means?
    That it had problems readin the media? Anyway, what does the vendor
    say?
    - Anders Gustafsson (Sysop)
    The Aaland Islands (N60 E20)
    Novell has a new enhancement request system,
    or what is now known as the requirement portal.
    If customers would like to give input in the upcoming
    releases of Novell products then they should go to
    http://www.novell.com/rms

  • Input data from HANA

    Hi team,
    Would I input data from HANA to ESP.
    I found SAP HANA output adapter, but I seems to be used for output.
    Is there no way that ESP get data from HANA ?
    Thank you in advance.

    Hello,
    A third alternative for getting data from HANA is to use the getData() function:
      http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01621.0514/doc/html/vge1312573080739.html
    CREATE COLUMN TABLE "SYSTEM"."ALERI" ("C1" INTEGER CS_INT NOT NULL ,
      "C2" INTEGER CS_INT NOT NULL ,
      "C3" INTEGER CS_INT NOT NULL ,
      "C4" VARCHAR(25) CS_FIXEDSTRING NOT NULL ,
      "C5" LONGDATE CS_LONGDATE,
      PRIMARY KEY ("C1")) UNLOAD PRIORITY 5 AUTO MERGE WITH PARAMETERS ('PARTITION_SPEC' = 'HASH 4 C1')
      Insert some data into the "ALERI" table.
    CREATE INPUT stream StockStream SCHEMA (NewColumn1 INTEGER, NewColumn2 INTEGER, NewColumn3 INTEGER, NewColumn4 STRING ,
    NewColumn5 bigdatetime );
    CREATE Flex stock_flex
    IN StockStream
    OUT OUTPUT STREAM stock_traded SCHEMA (c1 INTEGER, c2 INTEGER, c3 INTEGER, c4 STRING, c5 BIGDATETIME)
    BEGIN
      DECLARE
         vector (typeof (stock_traded)) asedata;
      END;
      ON StockStream {
      if(isnull(asedata))
      asedata := new vector(typeof (stock_traded));
      getData(asedata,'HANAODBCService','select * from aleri');
      for(rec in asedata)
      output setOpcode(rec,insert);
      resize(asedata,0);
    END;

  • How to input data into a table with columns?

    I am trying to input data into a table.  My table have 5 columns and an unlimited amount of rows.  I created a program in LabView that enters the data into the table but it enters all of the data in one row.  I would like to enter the first set of information into the first column, the second set of info into the second  column and so on.  I am including a copy of the program that I am working with.  I would like the number of runs to be put into the first column (it should count down like number 5 in first row, number 4 in second row, number 3 in third row, and so on).  I would like the applied voltage to be placed in the second column, and so on.  Any help or information will be greatly appreciated.  I am working with LabView Version 6.1 and 8.0.  I am submitting the vi from 6.1. 
    Attachments:
    FJ-PROGRAM.vi ‏68 KB

    Pondered,
    I looked at your code and I think you might be making things too complicated. I've included a very simple example that demonstrates how to write a 2D array of integers to a table. Hope you find this helpful. It is in LV 7.1.
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect
    Attachments:
    rows - columns.vi ‏17 KB

  • How to write input data into an xml file

    Hi All,
           I have some input data and i have to write it
    into an xml file.How is it possible send me some related
    links regarding this and source code if any.

    Hi
    Try to go through these links.I hope this will help you to solve your problem.
    http://www.xml.com/pub/a/2003/07/09/udell.html
    Thanks
    Mrutyunjaya Tripathy

  • Calendar display for an input date

    Can anyone give java code or logic, how to display the corresponding calendar for an input date?
    Input : 25052006
    Output:
    M T W T F S S
    1 2 3 4 5 6 7
    8 ----------------
    29 30 31
    Thanks in advance.

    Use Calendar class to get no. of days, week day etc.
    For GUI, hope u will tryAll knows that there are so many classes like - Calendar, Date, etc...etc..
    Can anybody help with a written code which will give output like that. Bcoz, I tried using Caledar, Date and all. Its giving a problem in month Feb and on leap years. If I get a code which will work fine then it will be fantastic.
    Thanks a lot in advance for helps.

Maybe you are looking for

  • How do i set email retention on iPhone 5S

    Email downloaded to my phone from my service provider deletes every day. I would like to retain it longer but I cannot find a setting to change it.

  • How can we send Error Idocs via mail

    Hi, I have read read through forums and  understood that it can be achieved either through workflow or through report using table edidd & edids. If workflow option is used , does the mail trigger for every error idoc ? How can we send daily error rep

  • Unable to fix a nuked Blackberry

    Hi All, I am new here, but have searched the web for a solution to this problem. I have a BlackBerry Curve 8520 which won't turn on and just has the red led light flashing sequence. I have looked at various different posts on how to restore a "nuked"

  • Pass non-database parameter from report to form

    (Portal 3.0.9) In short, how do I pass a non-database parameter into a form? I am calling a single form from multiple reports. On successful submission of the form, I want to return to the calling report. I have built the dynamic "go" statement in th

  • Playing a CD without noise?

    Hi! The program I use on my Windows-computer to play audio CDs has an option to limit the speed the CD is spinning, in order to reduce noise and save wear and tear on the CDs. I can't find any such setting in iTunes. Is there one, or can someone reco