Exiting loop on EOF

hi,
what I'm trying to do is to store and print out what the user has entered so far. As soon as the EOF character has been seen (^D), the program is supposed to store the input before the EOF, then exit.
The problem so far is that it only works if EOF is on a new line.
If there is text on the same line as EOF, it has to be pushed twice, which is undesired. I want it to exit as soon as one EOF is encountered
for example:
hello
^D
(will store hello then exit)
hello^D
( will store hello but will not exit, which is wrong)
hello^D^D
(wlll store hello and exit)
my program:
import java.io.*;
public class input{
public static void main(String[] args){
     StringBuffer input = new StringBuffer();
     try {
          BufferedReader in
               = new BufferedReader(new InputStreamReader(System.in));
          int val = in.read();
          while (val != -1){
               input.append((char)val);
               val = in.read();
               System.out.println(input);
     catch (EOFException e) {
     catch (IOException e){
thanks for your help

Hi Vibhuti,
Just declare a variable  with the same structure:
DATA:
  zlv_myline LIKE LINE OF <your internal table>.
LOOP AT <your internal table> INTO zlv_myline.
ENDLOOP.
John.

Similar Messages

  • How can I implement a "goto" in exiting loops?

    Hi, I've encountered a problem when trying implement an early exit from a loop. Can anyone advice me on this, really wish to how to tackle this issue.
    Thanks in advance...

    I'm going to assume you're using a For loop...  If this is the case you can do two things.  One, you could switch to a while loop, and just have the conditions 'if i = [former input to For loop N], stop', as well as the early exit condition wired to the stop (ORed).
    The other is that you could have all of your code inside error cases (case structure with error wired to the case selector), and once your early exit condition occurs, set the error to true, and the For loop will finish itself without executing any more code (essentially instant).
    I would recommend the while loop method, as there's less wasted CPU cycles.  I could however be way off with this answer.  If so, please be a bit more specific. 
    Hope this helps

  • Exit loop in BPM?

    Based on sap's documentation, loop in bpm works as While, Can anybody explain how to exit a loop in bpm similar to break statement in While loop? Is cancel the right step to use? will it cause potential issues then terminte the bpm normally(Stop)?
    Thanks,

    Hi,
    The "cancel process" option of the control step abruptly terminates the entire process and sets the status to "logically deleted" as per the documentation. Moorthy - if you have found a way to limit the scope of the control step to a block please advise - it does not work for me nor to I see any option for it (I am on SP16 so maybe it is in later SP).
    Anyway - when a bpm completes normally the status is set to "completed".
    I would suggest that the use of the "cancel process" in a control step is an extreme reaction to a catastrophic failure in your BPM that is unrecoverable. Not the situation that you have. Surely you can make use of local variables, switch statements and loop control to define the proper logical path through your BPM without resorting to canceling the process.
    Anyway - the short answer to your original question is this - There is nothing similar to a break statement in a loop control. Cancel process (or cancel step) is not the right way to terminate a loop or step in normal behaviour. It will most likely NOT cause any problems and it WILL terminate the BPM.

  • How to exit Loop in the middle

    I have a requirement of exiting a loop in between, if a particular condition is satisfied. How do i achieve this in workflow? I thought of using 'Process Control' but it has no option to exit a loop from the middle....is there a way out?

    Hi,
    Loop runs until a condition is met.
    So to exit a loop you need to set a condition as false at a step and then it would exit.
    To do so, you can set a flag value in the loop processing. When ever the flag is initial keep on processing the loop and when you want the loop to exit, just set the value of the flag.
    Hope this helps!
    Regards,
    Saumya

  • For loop, possible to increment counter/exit loop?

    I would like to know if it is possible to exit a For loop. I know
    I can use a while loop but it would be nice to be able to
    increment the loop counter in a for loop. Is this possible?
    Thanks,
    Mike

    Jim,
    OK, that clears it up. Coming from VB I'm still figuring out the
    differences.
    Thanks,
    Mike
    James Morrison/Joan Lester wrote:
    >
    > Also remember you can make while loops auto index. Right pop on the tunnel
    > and enable this and the loop will then act more like a for loop.
    >
    > Jim
    >
    > "Kevin B. Kent" wrote:
    >
    > > Mike Scirocco wrote:
    > >
    > > > I would like to know if it is possible to exit a For loop. I know
    > > > I can use a while loop but it would be nice to be able to
    > > > increment the loop counter in a for loop. Is this possible?
    > > >
    > > > Thanks,
    > > > Mike
    > >
    > > No sorry it is not possible.
    > > If you need this kind of functionality you will have to use a while loop.
    > > You can then setup all manner of conditions to exit the lo
    op.
    > > Be aware that the loop will always run at least ONCE.
    > >
    > > A for loop will run X number of times. This is determined either
    > > at compile time (if the count is hard coded) or at run time
    > > (if you use auto-indexing, or the count is a variable).
    > >
    > > Kevin Kent

  • Catch in Loop w/o exiting loop.

    Hi,
    I'm performing a LOOP at table.  ENDLOOP.  Within the loop I have a TRY. ENDTRY. CATCH.  This is so I can perform a arithmatic statement and catch any errors.  The problem is, if an error occurs it exits the LOOP.  I don't want to exit the entire LOOP statement.  I just want to continue on with the next record in my internal table.  But instead, the loop is exited.
    Any ideas?
    Example code:
      LOOP AT t_pcts ASSIGNING <wa_pcts>.
            TRY.
                <wa_pcts>-percent = <wa_pcts>-expprod / <wa_pcts>-actprod.
              CATCH cx_root INTO oref.
                text = oref->get_text( ).
            ENDTRY.
      ENDLOOP.

    Hi,
    check if your program is activated. TRY CATCH in LOOP works fine.
    For my program:
    DATA gt_vbrp TYPE TABLE OF vbrp WITH HEADER LINE.
    APPEND INITIAL LINE TO gt_vbrp.
    APPEND INITIAL LINE TO gt_vbrp.
    APPEND INITIAL LINE TO gt_vbrp.
    LOOP AT gt_vbrp.
      TRY.
          gt_vbrp-fkimg = 100 / gt_vbrp-fkimg.
        CATCH cx_root.
          WRITE: / 'Exception'.
      ENDTRY.
      WRITE: / sy-tabix.
    ENDLOOP.
    I get correct result:
    Exception
             1
    Exception
             2
    Exception
             3
    Program does not interrupt the loop.
    Regards,
    Przemysław

  • Exit loop on button state change

    Hello I've attached VI that executes states Setup/Measure/Save/Print and Wait if all other states are finished.  How can I implement feature, that if buttons dB/Ohm and IF AUTO/MAN changes their values program execution immediately goes to Setup case.
    For example: Measure state is exeuted... I press the button dB/Ohm or IF AUTO/MAN ... Measure state is left in the midle of execution and execution goes to Setup state.... after Setup state is finished program execution goes to the the interrupted state e.g Measure state.
    Attachments:
    SSM_V1.vi ‏15 KB

    You will need to use a producer / consumer architecture.
    Here is something I did (its messy, sorry don't have the time to clean it up) to demonstrate what can be done. This is a good architecture for you to follow as it can address most of UI based applications efficiently.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.
    Attachments:
    SSM_V1.vi ‏23 KB

  • Using java.nio

    I have copied this, one program from a book that would have to read file of gives to me to you mixed but it does not work, you could me why?
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.nio.ByteBuffer;
    import java.nio.channels.FileChannel;
    public class ReadPrimesMixedData {
    public static void main(String[] args) {
    File aFile = new File("C:/Beg Java Stuff/primes.txt");
    FileInputStream inFile = null;
    try {
    inFile = new FileInputStream(aFile);
    } catch(FileNotFoundException e) {
    e.printStackTrace(System.err);
    System.exit(1);
    FileChannel inChannel = inFile.getChannel();
    try {
    ByteBuffer lengthBuf = ByteBuffer.allocate(8);
    int strLength = 0; // Stores the string length
    ByteBuffer buf = null; // Stores a reference to the second byte buffer
    byte[] strChars = null; // Stores a reference to an array to hold the string
    while(true) {
    if(inChannel.read(lengthBuf) == -1) // Read the string length, if its EOF
    break; // exit the loop
    lengthBuf.flip();
    strLength = (int)lengthBuf.getDouble(); // Extract the length and convert to int
    buf = ByteBuffer.allocate(strLength+8); // Buffer for the string & the prime
    if(inChannel.read(buf) == -1) {            // Read the string & binary prime value
    assert false; // Should not get here!
    break; // Exit loop on EOF
    buf.flip();
    strChars = new byte[strLength]; // Create the array for the string
    buf.get(strChars); // Extract string & binary prime value
    System.out.println("String length: " + strChars.length+ " String: " +
    new String(strChars) + " Binary value: " + buf.getLong());
    lengthBuf.clear(); // Clear the buffer for the next read
    System.out.println("\nEOF reached.");
    inFile.close(); // Close the file and the channel
    } catch(IOException e) {
    e.printStackTrace(System.err);
    System.exit(1);
    System.exit(0);
    This e' the program that writes the file
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.FileChannel;
    public class PrimesToFile2 {
    public static void main(String[] args) {
    int primesRequired = 100; // Default count
    if (args.length > 0) {
    try {
    primesRequired = Integer.valueOf(args[0]).intValue();
    } catch (NumberFormatException e) {
    System.out.println("Prime count value invalid. Using default of "
    + primesRequired);
    long[] primes = new long[primesRequired]; // Array to store primes
    primes[0] = 2; // Seed the first prime
    primes[1] = 3; // and the second
    // Count of primes found - up to now, which is also the array index
    int count = 2;
    long number = 5; // Next integer to be tested
    outer:
    for (; count < primesRequired; number += 2) {
    // The maximum divisor we need to try is square root of number
    long limit = (long) Math.ceil(Math.sqrt((double) number));
    // Divide by all the primes we have up to limit
    for (int i = 1; i < count && primes[i] <= limit; i++)
    if (number % primes[i] == 0) // Is it an exact divisor?
    continue outer; // yes, try the next number
    primes[count++] = number; // We got one!
    File aFile = new File("C:/Beg Java Stuff/primes.txt");
    FileOutputStream outputFile = null;
    try {
    outputFile = new FileOutputStream(aFile);
    } catch (FileNotFoundException e) {
    e.printStackTrace(System.err);
    System.exit(1);
    FileChannel file = outputFile.getChannel();
    final int BUFFERSIZE = 100; // Buffer size in bytes
    ByteBuffer buf = ByteBuffer.allocate(BUFFERSIZE);
    DoubleBuffer doubleBuf = buf.asDoubleBuffer();
    buf.position(8);
    CharBuffer charBuf = buf.asCharBuffer();
    LongBuffer longBuf = null;
    String primeStr = null;
    for (int i = 0; i < primes.length; i++) {
    primeStr = "prime = " + primes; // Create the string
    doubleBuf.put(0,(double) primeStr.length());// Store the string length
    charBuf.put(primeStr); // Store the string
    buf.position(2 * charBuf.position() + 8); // Position for 3rd buffer
    longBuf = buf.asLongBuffer(); // Create the buffer
    longBuf.put(primes[i]); // Store the binary long value
    buf.position(buf.position() + 8); // Set position after last value
    buf.flip(); // and flip
    try {
    file.write(buf); // Write the buffer as before.
    } catch (IOException e) {
    e.printStackTrace(System.err);
    System.exit(1);
    buf.clear();
    doubleBuf.clear();
    charBuf.clear();
    try {
    System.out.println("File written is " + file.size() + " bytes.");
    outputFile.close(); // Close the file and its channel
    } catch (IOException e) {
    e.printStackTrace(System.err);
    System.exit(1);
    System.exit(0);
    This works correctly

    I don't have problems when I compile the program but if I run the program ....I have this
    String length: 9 String: prim Binary value: 7277852183226228736
    String length: 0 String: Binary value: 162166969980682240
    String length: 0 String: Binary value: 7854388801345436928
    String length: 0 String: Binary value: 3573983215616
    Stjava.lang.IllegalArgumentException
    at java.nio.ByteBuffer.allocate(ByteBuffer.java:303)
    at ReadPrimesMixedData.main(ReadPrimesMixedData.java:35)
    ring length: 0 String: Binary value: 7566167222444367872
    String length: 0 String: Binary value: 88089088
    String length: 0 String: Binary value: 8214681170873443584
    String length: 0 String: Binary value: 1856
    String length: 0 String: Binary value: 8070575878335130880
    Exception in thread "main"

  • Prematurely exit enumeration loop

    i am enumerating thru a loop
    upon a certain condition, i want to exit the loop, while keeping the object of the current enumeration in tact.
    Foo foo = null;
    Enumeration = fooVector.elements();
    while(Enumeration.hasMoreElements())
      foo = (Foo) enumeration.nextElement(); // get a foo
      if (some condition is met)
        // exit loop, but keep object foo in tact
        // that is, don't do foo = nextElement()
    }I suppose i could do the following, but is there anything more graceful?
    Foo foo = null;
    Foo foundFoo = null;
    boolean found = false;
    Enumeration = fooVector.elements();
    while(Enumeration.hasMoreElements())
      foo = (Foo) enumeration.nextElement(); // get a foo
      if ((some condition is met)  && (! found))
        foundFoo = new Foo(foo);
        found = true;
    // use foundFoo

    Foo foo = null;
    Enumeration = fooVector.elements();
    while(Enumeration.hasMoreElements())
    foo = (Foo) enumeration.nextElement(); // get a
    a foo
    if (some condition is met)
    {break; //This is what you want to do
    // exit loop, but keep object foo in tact
    // that is, don't do foo = nextElement()
    /Kaj

  • Stopping output tasks properly before exiting a For-loop

    Hi,
    I've been having some trouble exiting a For-loop conditionally. The problem is that when the loop is stopped conditionally (a button is pressed) the DAQ (NI USB 6353) outputs get stuck to whatever value they were in. I tried stopping the DAQ Assistant output task (1 sample on demand)  before exiting the loop but that didn't solve the problem. Should this perhaps be done one iteration before exiting the loop or can it be done in the same iteration round?
    What would be the "right" way to exit a for loop with output tasks so that the output signals would be 0V after exiting? I know that I could "force" feed the DAQ Assistant with 0V control before exiting but in this case that would be quite difficult...
    Any ideas? Help is appriciated.

    Yes, I get it... However at this point I don't think that's an option.
    Would this kind of solution work? ( I am not able to test all possible solutions in the real system which is why I would like to get a confirmation first)
    The idea is to connect the output of the "Or" port to the "Stop" -ports of the DAQ Assistants in the loop.
    Edit. Will the output automatically go to 0V if I just stop the task? I am not really sure about this.
    Thank you.
    Attachments:
    exit-loop.jpg ‏8 KB

  • How to exit from the loop

    loop at itab.
    if <CONDITION>
    <EXIT LOOP>
    endif
    endloop.
    this ths condition , pz tel how to exit from loop

    Hi
    Loop
       statements
    EXIT
    Endloop.
    Will comes out of the loop.
    Regards,
    Sreeram Kumar.Madisetty

  • Using JOptionPane to exit program & Using toString method

    Hello,
    In my program I have to use a toString method below
    public String toString(Hw1NCBEmployee[] e)
            String returnMe = String.format(getStoreName() + "\n" + getStoreAddress() + "\n" + getCityState() +  "\nYou have " + getEmpCount() + "employee(s)");
            return returnMe;
    }Now, at first, when I initially tested my code, it was working just fine, printing out the right way
    Point is -- now that Im practically finished with my program, and am going back and running it - calling the toString method gives me the address rather than the information . . . Can anyone help me with this issue??
    Also, Im using JOptionPane to display everything, but -- at first, it worked fine, then (around the same time I started having the above problem) it stopped exiting the do-while loop:
    while(go)
                 int option = JOptionPane.showConfirmDialog(null, "Do you want to enter employee information?", "Welcome!", JOptionPane.YES_NO_OPTION);
                     if(option == JOptionPane.NO_OPTION)
                        go = false;  //exit loop
            

    ncjb wrote:
    well, for the toString - I have to print out the info inside the array -- am I right in thinking that the only way to do this is to pass in the array ??If the array is part of the class then there is no need to pass it as a parameter. If it is being passed in from outside the class then I have to question your design. Why should class X being formatting data that is not a representation of itself?
    and i have 2 other files that go with this program . . . I just want to know if there is a way to make sure that when the user presses the NO option, it will exit the loop -- the piece of code you see if apart of an entire method (not long) -- do you want me to include this??You read that link I provided REAL quick!

  • Need help in creating for loop

    Hi,
    I want to create two different Xquery transformation by checking attribute value in the input xml.
    <n:DIAMessage xsi:schemaLocation="http://pearson.com/DIA C:/shashi/rewrite/DIA/DIA_Schemas/DIA_new.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n="http://pearson.com/DIA">
    <n:Customer>
    <n:Account sourceClassName="Account" sourceInstanceID="01560900" sourceSystem="MDR">
    <n:hasAccountRelation sourceClassName="AccountRelation" sourceInstanceID="01560900" sourceSystem="MDR">
    <n:hasAccountPerson name="BRIAN C STRICKLAND" sourceClassName="Person" sourceInstanceID="01560900|$|00114" sourceSystem="MDR"/>
    </n:hasAccountRelation>
    </n:Account>
    <n:Account sourceClassName="Account" sourceInstanceID="01560900" sourceSystem="MDR">
    <n:hasAccountRelation sourceClassName="AccountRelation" sourceInstanceID="01560900" sourceSystem="MDR">
    <n:hasAccountPerson name="BRIAN C STRICKLAND" sourceClassName="Person" sourceInstanceID="01560900|$|00114" sourceSystem="MDR"/>
    </n:hasAccountRelation>
    </n:Account>
    <n:Person name="BRIAN C STRICKLAND" sourceClassName="Person" sourceInstanceID="01560900|$|00114" sourceSystem="MDR">
    <n:hasIdentifier sourceClassName="Identifier" sourceInstanceID="01560900|$|00114" sourceSystem="MDR">
    <n:IDType>GENDER</n:IDType>
    <n:IDTypeName>GENDER</n:IDTypeName>
    <n:IDValue>M</n:IDValue>
    </n:hasIdentifier>
    </n:Person>
    <n:Person name="BRIAN C STRICKLAND" sourceClassName="Person" sourceInstanceID="01560900|$|00114" sourceSystem="MDR">
    <n:hasIdentifier sourceClassName="Identifier" sourceInstanceID="01560900|$|00114" sourceSystem="MDR">
    <n:IDType>GENDER</n:IDType>
    <n:IDTypeName>GENDER</n:IDTypeName>
    <n:IDValue>M</n:IDValue>
    </n:hasIdentifier>
    </n:Person>
    </n:Customer>
    </n:DIAMessage>
    From the above Message i need to create two transformation by checking
    if (DIAMessage/Customer/Account/@sourceClassName="Account")
    then call {
    Xquery1
    if(DIAMessage/Customer/Person/@sourceClassName="Person")
    then call{
    Xquery2
    Constraint here is Account and Person block occurence will be many times.As they are in same hierarchy how to create a for loop concept here?
    Please anyone can help me on this?

    Hi,
    Create a numeric variable to act as While loop counter and assign value of 1. Create a boolean variable to act as a flag to exit loop and assign value of true.
    Create a while object with a condition that while flag variable is true loop.
    Then you can create a switch with a case for each of your scenarios, referencing the xth record (defined by loop counter variable) in xml using ora:getElement
    When the count of required elements in input xml is less than your loop variable, assign the variable to exit loop as false...otherwise increment counter by one to loop to next record.
    Hope this helps.

  • Loop Page Style Sheet to set file name.

    I am exporting pages to jpgs and pngs using a script that pulls the name from an applied style sheet.
    http://forums.adobe.com/message/5913479#5913479
    the above works perfectly if I only want to specify one style sheet as the file name.
    the challenge may need to use different style sheets on each page to create the name.
    I am not sure how to loop through each page and grab the style in play.
    or if I need to loop at all.
    This is where I am...
    function MakePNGfile()
         for(var myCounter = 0; myCounter < myDoc.pages.length; myCounter++)
              if (myDoc.pages.item(myCounter).appliedSection.name != "")
                   myDoc.pages.item(myCounter).appliedSection.name = "";
          var myStyle1 = "sheetlabel-text";
          var myStyle2 = "sheetlabel-text-2";
          var myParagraphs = myDoc.pages.item(0).textFrames.item(0).parentStory.paragraphs; 
              var myPageName = myDoc.pages.item(myCounter).name;
          var myPNGPrefix = "";
         for( i = 0; i < myParagraphs.length; i++)
             var paragraph = myParagraphs.item(i);
    if (paragraph = myStyle1)
        (myPNGPrefix = getParagraphContent(myDoc.paragraphStyles.item("sheetlabel-text"),  myDoc.pages.item(myCounter))+ '-0' + myPageName)
    else
        (myPNGPrefix = getParagraphContent(myDoc.paragraphStyles.item("sheetlabel-text-2"),  myDoc.pages.item(myCounter))+ '-0' + myPageName)
    Thanks for your help!

    Good to hear .
    Find attached the next version. You can now insert in 'paraStyleNames' as many style names as you want. The script will check from left to right, if there is one found on the page. If this is true, the script will ignore the other styles.
    Removing leading zero should work now.
    Maybe one problem: If one page contains no style, this page will be exported nevertheless with it’s correct page number, but with the founded text of the previous page. If this can never happen, we are done and you should mark the answer as correct. If this is a real problem for you, please let me know, what should happen in this case and I will try to fix that too.
    // Export pages as JPG with additional info by Kai Rübsamen
    // http://forums.adobe.com/message/6326425#6326425
    main ();
    function main() {
    var curDoc = app.activeDocument;
    // Array of paragraph Style names
    var paraStyleNames = ["h1", "h2"]; // insert here your para names !
    var missingParaStyles = [];
    // check, if the styles are valid
    for ( var p = 0; p < paraStyleNames.length; p++ ) {
        var curName = paraStyleNames[p];
        // if the style is missing, push it to the array
        if ( !curDoc.paragraphStyles.itemByName(curName).isValid ) {
            missingParaStyles.push( curName );
    // if some styles are missing, give an alert
    var nMiss = missingParaStyles.length;
    if ( nMiss > 0 ) {
        var display = missingParaStyles.join( "\r" );
        alert ( "Missing para(s):\r" + display );
        exit();
    // loop through all pages
    for ( var i = 0; i < curDoc.pages.length; i++ ) {
        // the current page
        var curPage = curDoc.pages[i];
        // the current pages name
        var pName = curPage.name;
        // controls the loop
        var controller = true;
        // all paragraphs on the current page
        var allPageParas = curPage.textFrames.everyItem().paragraphs.everyItem().getElements();
        // loop through all paragraphs and check, if one has the para style applied
        for ( var p = 0; p < allPageParas.length; p++ ) {
            if ( !controller ) break;
            // the current para
            var curPara = allPageParas[p];
            // loop through the styles
            for ( var n = 0; n < paraStyleNames.length; n++ ) {
                if ( curPara.appliedParagraphStyle.name == paraStyleNames[n] ) {
                    var paraContents = curPara.contents;
                    var paraString = "-" + paraContents.replace( /\s+$/ , "" ).replace( /\s+/g , "-" ).toLowerCase();
                    controller = false;
                    break;
                } // end if
            } // end for paraStyleNames
        } // end for allPageParas
        //~ var folderPath = "~/-client/JOYS - Just Organize Your Stuff/-Art/-art-book-kindle/";
        var folderPath = Folder.desktop;
        if ( pName < 10 ) {
            var appendix = "-0" + pName + paraString;
        else {
            var appendix = "-" + pName + paraString;
        var filePath = folderPath + "/" + curDoc.name.replace(/\.indd$/,"") + appendix + ".jpg";
        var myFile = File( filePath );
        with ( app.jpegExportPreferences ) {
            jpegQuality = JPEGOptionsQuality.high; // low medium high maximum
            exportResolution = 72;
            jpegExportRange = ExportRangeOrAllPages.exportRange;
            pageString = pName;
        curDoc.exportFile( ExportFormat.jpg, myFile, false );
      } // end for pages
    } // end main
    –Kai

  • IPhone 3g 16gb recovery/restore loop

    2 recent iPhone 4s working ok since day 1. I (Dad) inherit 2yr old (out of warranty) iPhone 3g 16gb. Recently the phone went into the WSOD, Apple Logo, Recovery, Restore loop (was connected to car audio). Phone has not had any other problems since day one. Not jailbroken or unlocked. Rogers sim inside no longer active (iPod & Wifi usage).
    Research week & tried every suggestion to do a phone restore/upgrade in order to get it out of the "Recovery Mode" loop (3 hours per day x 7).
    Here is my list:
    Full Battery - charges ok
    Firewall - turned off
    Disabled AV
    Reinstall iTunes (recent & old)
    # software suggestions to Enter & Exit Loop
    Different PC - 5, USB ports, direct, USB Cables (Apple old & new)
    Different modes - DFU, Emergency
    Nothing else running on PC
    PC makes noise when connects & disconnects
    "Dock Connector" replaced - error 9 suggestion - no difference (old dock ok)
    PC recognizes iPhone - assume usb drivers ok - Apple Mobile Device (Recovery Mode) USB Driver - no errors
    During the restore process, consistently error 9 s out within seconds of (Apple Logo above empty bar) "Waiting for iPhone"
    Suggestions & Help is always appreciated, perhaps this list will help someone else with the similar journey. Hard not to think that this is a software/firmware issue (But then always careful with sure bet advice!).

    Tx x 2 I did read the information from Apple that you just posted. Note in my original post I do discuss trying all these combinations and permutations w.r.t. USB isolation/variation (only thing I have not tried is an OS other than Win 7 (XP or Vista) or via a MAC) - even having the dock connector replaced.
    I have not gone to the Apple Store (and have no intent on doing so) and yes it is possible the phone is defective - would boil down to the logic board imho. The phone is out of warranty (again as stated above 2+ years old). This translates into swapping the device or paying for consulting time - given the resale market does not make economic sense imho.
    The original intent of posting in this forum is that I have the sense a number of hardware ok iPhones (perhaps including mine) appear to be having firmware/software issues - reproduceable error 9 - the device connects and disconnects from the pc up until the "Waiting for iPhone"

Maybe you are looking for

  • Send Welcome Email to New User using the Scripting Agent

    Hi I require some assistance please.  I have found a number of scripts online to send a Welcome Email to new users whereby they make use of the ScriptingAgent.xml file. I like the way the scripts have been configured and have mashed up one or two scr

  • What are these features and how can I use them?

    Why do I have SDM Profile, Dyanmic private IP, Pay per message, Mobile Hotspot provisioning,   My mom is on the same account and does not have these.  Everything I look at points to enterprise stuff and administration.  I'm not aware of any of that. 

  • E70 - USB cable connection hangs

    Hi All, My E70 usb cable connection gets disconnected regularly both on my desktop and laptop computers (USB 2). Very annoying when trying to download something and your connection is gone. Any remedies? Software updater tells me my firmware has no u

  • Getting videos (with sound) on my iPod?

    I just got a iPod Video, but I had previously downloaded videos from the internet. I added the videos onto iTunes with no problems, but syncing it to my iPod is another story. Itunes had stated that I had to convert the video files in order to put th

  • TS3376 What does "Erase" exactly mean?

    If using the "Remote Wipe" feature to have data erased, what EXACTLY is erased.  All this website ever says is that the personal data is erased. So is that only phone numbers, or does it include email, etc.  Does it wipe everything out so the phone i