Problem: Why does this only work for powers of 2?

I wrote this program to create a golf league schedule for, ideally, eight players. However I want it to be flexible enough to permit for other denominations, such as 10 or 12. When I run the program it works perfectly for any number that is a power of 2 (2,4,8,16,32,etc...) but it will not work for other even numbers such as 6,10, or 12. If anyone has any insights it would be most helpful.
*(This is my first post on this forum so if anything looks not quite right or if this post isn't worded exactly how it should be then I apologize in advance)*
Here's the three classes.
public class ScheduleDriver
     public static void main(String[] args)
                          //instance variables
          int max;     //size of flight matches array
          ScheduleMaster master;//instance of class
          //get max number of players for flight
          System.out.print("Max number of players in this flight:");
          max = Keyboard.readInt();
          master = new ScheduleMaster(max);
          //create weekly schedules for season
          master.createSchedule();
          //display weekly schedules
          master.displayWeekly();
     }//end main
}//end ScheduleDriver
public class ScheduleMaster
     //instance variables
     int maxPlyrs;//maximum number of players in flight
     Week[] weeklySchedule;//array of weekly matches
     public ScheduleMaster(int plyrs)
          //set up instance data and declare array size
          maxPlyrs = plyrs;
          weeklySchedule = new Week[plyrs];
          //set up the size of each week's matches array
          for (int pos = 0; pos < plyrs; pos++)
               weeklySchedule[pos] = new Week(plyrs);
          }//end for
     }//end constructor
     public void createSchedule()
          int count = 0;//index of weeklySchedule array
          final int QUIT = -1;     //quit value for loop
          int flag = 0;     //value to continue or exit loop
          //for each player A
          for (int a = 1; a < maxPlyrs; a++)
               //for each opponent of player A
               for (int b = (a + 1); b <=maxPlyrs;b++)
                    //set count/index and       reset flag to zero
                    count = (a - 1);
                    flag = 0;
                    //while still haven't found correct week for this match
                    while (flag != QUIT)
                         //if at least one of these players are already scheduled
                         //for a match this week
                         if (weeklySchedule[count].checkPlayers(a,b) == true)
                              //if last valid index of array has been reached
                              if (count == (maxPlyrs - 2))
                                   //reset count/index to zero
                                   count = 0;
                              else
                                   //incriment count
                                   count++;
                         }//end if
                         else
                              //assign this match to array of matches for week
                              //and then exit loop
                              weeklySchedule[count].setMatch(a,b);
                              flag = -1;
                         }//end else
                    }//end while
               }//end for
          }//end for
          //fill in last week/position night
          for (int pos = 0; pos < maxPlyrs;pos++)
               //set up position match
               weeklySchedule[maxPlyrs - 1].setMatch(pos + 1, pos + 2);
               //incriment pos
               pos++;
          }//end for
     }//end createSchedule
     public void displayWeekly()
          //for each week in schedule
          for (int pos = 0; pos < maxPlyrs;pos++)
               //display header
               System.out.print("WEEK " + (pos + 1));
               //if pos/index is 0 or even, flight plays front 9
               if ((pos % 2) == 0)
                    System.out.println(" [FRONT 9]");
               //else flight plays back 9
               else
                    System.out.println(" [BACK 9]");
               //display lines
               System.out.println("----------------");
               //display week's matches
               weeklySchedule[pos].display();
               //skip a line
               System.out.println("\n");
          }//end for
     }//end displayWeekly
}//end ScheduleMaster
public class Week
     int[] schedule;          //array of players involved in matches for week
     int max;               //max number of players
     int count = 0;          //number of players currently involved in matches
     public Week(int size)
          //set up instance data and size of array
          max = size;
          schedule = new int[size];
     }//end constructor
     public boolean checkPlayers(int playerA, int playerB)
          boolean flag = false;     //flag to determine if at least one of
                                        //the players to check are already playing
                                        //this week
          //for each element of array
          for (int pos = 0; pos < max; pos++)
               //if player A matches player already playing this week
               if (schedule[pos] == playerA)
                    flag = true;
          }//end for
          //for each element of array
          for (int pos = 0; pos < max; pos++)
               //if player B matches player already playing this week
               if (schedule[pos] == playerB)
                    flag = true;
          }//end for
          return flag;
     }//end checkPlayers
     public void setMatch(int playerA, int playerB)
          //if array can take more matches
          if (count <= (max - 2))
               //insert players into array of active players for week
               schedule[count] = playerA;
               schedule[count + 1] = playerB;
               //incriment count of players playing this week by 2
               count = count + 2;
          }//end if
          else
               System.out.print("No more matches can be entered!!!");
     }//end setMatch
     public void display()
          //for every even numbered index starting at zero
          for (int num = 0;num < max;num++)
               //display the player at that position and the next consecutive
               //player who will be his opponent for the week
               System.out.println(schedule[num] + "VS" + schedule[num + 1] +
               //incriment num
               num++;
          }//end for
     }//end display
}//end Week

Ah, I have discovered the problem. The reason for the infinite loop was because of the resetting of the counter/index after every successful match entry back to (a - 1). This was causing matches to be put into weeks where they didn't belong, which caused the program to infinitely loop because it couldn't find an appropriate week to place it's next match. The only time the count should be reset back to zero is when a new player A is being processed or the last valid array index has been referenced before an out of bounds exception would be thrown. I'm still not entirely sure why this doesn't occur on powers of 2 but theh again I haven't put too much thought into it having solved the initial problem! :)
Anyways thanks for the input all who posted, much appreciated.
Happy programming!!!!

Similar Messages

  • Why does iMessage only work for some of my contacts?

    Having problems with iMessage. It will work for some of my contacts but not others. And those people arre having the same problem, works with other people but not me.. Anyone dealt with this?

    1. Both devices have to be running iOS 5.*
    2. Internet latency can delay iMessage connection.  If you enabled "Send as SMS", the phone will switch to SMS if iMessage doesn't connect quickly.  If you disable Send as SMS, more of your messages will go through as iMessage.

  • HT204291 Airplay intermittent problem, why does not airplay work well anylonger?

    Airplay intermittent problem, why does not airplay work well anylonger. Suddenly it drops out. Now this function has gone from great to ****.
    Trying to view streamed content from the ipad to the Apple TV? Nah forget about it. Sooo dissapointing.

    Restart your wifi router

  • After updating safari why does it only works intermittently now?

    After updating safari why does it only work intermittently now?

    Please explain in more detail what you updated and what isn't working now. You might also add anything you have already done to correct the problem.

  • I know I am a luddite but if I am streaming content on my Ipad from a TV station can I get it to appear on Apple TV or does it only work for things in my itunes library?

    I know I am a luddite but if I am streaming content on my Ipad from a TV station can I get it to appear on Apple TV or does it only work for things in my itunes library?

    Welcome to the Apple Community.
    Websites and third party Apps need enabling before they will allow AirPlay of Video content. Some Website/App developers have not enabled their products, some simply haven't got around to it yet, others have stated that they won't be enabling AirPlay (likely as a result of licensing issues).
    I have created a User Tip to list Apps that have been tested with Video Airplay, if you have any Apps that you have tested please leave details in the comments at the bottom of the User Tip or email me if you don't have commenting privileges.

  • Usb will only work for powered devices

    I am having an issue to where my USB ports will only work for devices that have power supplied to them, ie an external hard drive that has a power adapter and not for devices that do not have power supplied to them.  I was seeing if anyone could help me resolve this issue?
    I have a Macbook Pro 15 inch Late 2011 model w/ the 2.2 Ghz i7 Processor.

    Eustace Mendis wrote:
    This is simply a case of the USB ports not being able to provide enough power. I do not know if there is a way to change this.
    This is highly unlikely, the USB specification (to which Apple adhere) requires a constant 1 amp at 5 volts, a peak of 2 amps for a brief period is available. All reputable manufacturers adhere to this spec, it is more likely a fault condition.
    To the OP, reset the Pram http://support.apple.com/kb/ht1379 
    and reset the SMC http://support.apple.com/kb/HT3964
    Reboot the machine and try again.
    If this brings no relief you should follow Oglethorpes advice and take it to Apple for repair.

  • Why does GarageBand audio work for guest user but not my account?

    Hello, I have a 15-inch MacBook Pro (2.2 GHz Intel Core i7, 4GB 1333 MHz DDR3) from late 2011 that I bought brand new in 2012. I'm running OS X Mavericks 10.9.4 and my MacBook has 500 GB of storage.
    About a month or two ago I tried to download the new GarageBand (10.0.2) but I had trouble completing the loops download. The download would stop halfway through because of a network error. So last week I decided to try to download it again, and I was able to do so after reading some discussions about the issue. I successfully completed the download in safety mode and then I restarted my MacBook. At this point I was able to open GarageBand 10.0.2 and create a new project. Unfortunately, there was no audio coming through the output and sound bar for the various audio components in GarageBand. I had no audio when previewing the loops or playing it back in an audio track. I didn't really test anything else out because I figured I needed to fix this problem first. I have read many discussion boards about audio problems with GarageBand. I have already made sure everything is set properly in the GarageBand preferences and the audio preferences in system preferences. I've tried restarting GarageBand and restarting the computer.
    This evening I found a discussion from the username icewhatice and they seemed to have had my exact problem. I'm not sure that I found the answer on this discussion though. For reference, this is what icewhatice posted: "I have no audio coming from Garageband 10.0.2. Downloaded it on Saturday and have spent the last two days trying to figure out why it won't work. I'm using a macbook pro with an Alesis QX49. GB registers keyboard when I plug it in but no sound whatsoever, not even from the onscreen keyboard. It seems to read the keyboard as if I play a C chord, it appears in the display. I've done all the obvious stuff like check preferences, restart, I've deleted and downloaded new GB several times and always with same result. Actually, it took me about four attempts to download it in the first place as I was getting an internet connection error message right at the end of the download, and I see others have had that problem. Managed to solve that by downloading in safe mode but now the no sound thing is driving me absolutely crazy because I can't play my keyboard!!!!! Also, worth noting that there is no audio level being read anywhere, I believe in the new version this appears in the volume control at the top. I've also looked into it potentially being a problem with my keyboard and it possibly needing an update but can't find any difinitive answer for that anywhere. I've stopped looking into that because the on screen keyboard doesn't even work - if that worked then I would know at least GB works and it's something to do with the keyboard. So, I am at a complete loss. If anyone has any ideas about why this is happening or what I could do to solve then I would be very grateful."
    After reading this, I realized that I am unable to create new tracks, and I realized that I have the same problems with old projects saved from the last version of GarageBand I had. I have not tried to download GarageBand again since it did not work for icewhatice. léonie ended this post by saying: "Something is certainly wrong - either the current project, some settings in your user account, or the downloaded GarageBand version. Or incompatible software may be interfering. If a new project does not work, try to test by logging into a different user account, for example the "Guest User" account. Create a new project using this account. Does GarageBand work better from this account?  Then we will need to troubleshoot your preferences."
    I have tried this and started a new GarageBand project in the "Guest User" account. GarageBand was working fine in the "Guest User" account and all of the audio was working properly. Does anyone know how I should troubleshoot my preferences?

    If an application is working in a different account, but not in your regular account,try t find out, what you configured differently in your own account, for example start-up items or preference panes you are using, applications and other helper tools, that are only installed for your regular account. As a first guess, remove GarageBands preference files from the user library in your Home folder.
    But you will have to reset all settings you did in the GarageBand preferences dialog. And GarageBand will not remember the last project. You'll have to find the file manually.
    Remove these files from your User Library to a folder on your Desktop:
    ~/Library/Containers/com.apple.garageband10/
    ~/Library/Preferences/com.apple.garageband.plist
    ~/Library/Caches/garageband
    Quit GarageBand, then remove the files to a folder on the Desktop and restart the computer, before trying again to open GarageBand.
    You user library may still be hidden, as is the default in Mavericks: To open your hidden user library:
    Select the "Home" folder icon (the little house)  in the Finder's sidebar and press the key combination ⌘J to open the "view options".
    Enable "Show Library Folder".
    Then open the Home folder and open the Library folder inside and navigate to the Preferences, Caches, or Containers folder. Remove these folders completely - don't leave anything inside:  ~/Library/Containers/com.apple.garageband10/,
    ~/Library/Caches/garageband  .

  • Apple Mail specific domain domain \ username does this still work for Mavericks?

    THIS DISCUSSION IS ARCHIVED
    Where do I include Exchange domain in Mail setup?
    10212 Views 8 Replies Latest reply: Aug 18, 2010 2:37 PM by jruano  
    Level 1 (10 points) 
    mike_donahue 
    Jun 2, 2010 4:46 PM 
    Our company is running Exchange 2007, OWA enabled, EWS is setup, Auto discovery is enable. The only thing I haven't got an answer on is whether Service Pack 4 has been installed. The server is set up with a domain specified but I don't know where to include that in the Mail Account Setup. Mail seems to be locating the server fine but it says username or password can not be verified. I can only assume that it's because I haven't included the domain correctly.
    iPad (and I assume iPhone/iTouch) have a field in their setup to include the domain and a coworker is connecting fine with to the company server. Where is it in Mail? I have tried to prepend it to my username (domain/username) but it hasn't worked. I can't recall all the variations I have tried of this, but unless I have the domain first in the username field, Mail won't even connect to the server. I've been all over these boards and dozens more and I can't find any answers to this problem.
    Any here have any ideas? Thanks,
    Mike D 
    MacBook Pro, Intel Core 2 Duo 2.66 GHz, Mac OS X (10.6.3), 4 gig RAM
    I have this question too (0) 
    Categories: Mail and Address bookTags: mail_address_book_macosx_v10.6, mac_os_x_v.10.6
    Level 7 (22,080 points)
    Matthew Morgan Los Angeles, CA
    Re: Where do I include Exchange domain in Mail setup?Jun 2, 2010 5:48 PM (in response to mike_donahue) 
    Here's an article that may help.
    http://support.apple.com/kb/HT3748
    MattDual 1.8 GHz G5 2.5 GB RAM/MBP 2.26GHz 2GB RAM/iPod nano 4g/iPhone 3GS, Mac OS X (10.6.2), ATI Radeon 9600, Time Capsule, AirPort Express
    Like (0) 
    Level 1 (10 points)
    mike_donahue
    Re: Where do I include Exchange domain in Mail setup?Jun 2, 2010 9:01 PM (in response to Matthew Morgan) 
    I already read that one and it fails to address the domain question, but thank you for the suggestion.
    MikeMac OS X (10.6.3)
    Like (0) 
    Level 1 (10 points)
    mike_donahue
    Re: Where do I include Exchange domain in Mail setup?Jun 6, 2010 5:07 PM (in response to mike_donahue) 
    Bump.
    I still haven't found an answer to this. Anyone else have any ideas. Still waiting to hear back from out IT guys about the service pack issues.
    Is there any way to attach a screen grab to a post? Thought it might help paint the picture in case I haven't stated it clearly.
    Again, thanks in advance for any help with this.
    MikeMacBook Pro, Intel Core 2 Duo 2.66 GHz, Mac OS X (10.5.1), 4 gig RAM
    Like (0) 
    Level 1 (0 points)
    tf99
    Re: Where do I include Exchange domain in Mail setup?Jun 22, 2010 1:00 PM (in response to mike_donahue) 
    Hi. I'm having precisely the same problem. My Exchange account works like a charm on my iPhone, but all permutations of the same settings simply don't work in OS X Mail (v. 4.3).
    Has anyone out there set up an Exchange account with a domain? Can you tell us where you put it to get the account to work?
    Thanks!2.0 GHz MacBook, Mac OS X (10.6.4)
    Like (0) 
    Level 4 (2,535 points)
    Asatoran
    Re: Where do I include Exchange domain in Mail setup?Jun 22, 2010 1:16 PM (in response to mike_donahue) 
    Enter your username as:
    <domain>\<username>
    This is standard practice for Microsoft if there's no place to enter the domain name.
    (Note the backslash, not the forward slash. Backslash is NOT the one under the question mark on a U.S.A. English keyboard.)MBP 15" Penryn, Mini 2009, Mac OS X (10.6.2)
    Like (0) 
    Level 1 (0 points)
    tf99
    Re: Where do I include Exchange domain in Mail setup?Jun 22, 2010 1:42 PM (in response to Asatoran) 
    Thanks Asatoran. That turned out to be part of the solution for me. The other part was changing the port I used for the SSL connection -- it was set wrong at some point, either because the default was wrong, or because I forgot I had changed it in troubleshooting before trying the slash the way you suggest. Anyway, the port number for some reason doesn't show up on my iPhone settings, so it didn't occur to me to tweak it.2.0 GHz MacBook, Mac OS X (10.6.4), 4GB RAM
    Like (0) 
    Level 1 (0 points)
    frieiv
    Re: Where do I include Exchange domain in Mail setup?Jun 25, 2010 12:06 PM (in response to tf99) 
    Hi!
    Could you please state the port numer you changed from and to?
    I´m having the same problem and still can´t access the exchange server outside the company network.
    But it seems like Mail 4.3 tryes to use the internal server and never the external? Any tips on this?MacBook Pro, Mac OS X (10.6.4)
    Like (0) 
    Level 1 (0 points)
    jruano
    Re: Where do I include Exchange domain in Mail setup?Aug 18, 2010 2:37 PM (in response to mike_donahue) 
    <domain>\<username> worked for me... FINALLY!!
    Thanks muchMacBook Pro, Mac OS X (10.6.4), iMac

    Quit your mail entirely, then in terminal do:  
    mv ~/Library/Mail/V2/MailData/Envelope* ~/Desktop 
    This moves all your "Envelope Index*" files to your desktop.  An alternative is deleting the files, but this allows you to keep them as a temporary back-up (you can delete them at-will later).  Also, you can move the files from Finder instead of Terminal, if you prefer. 
    After the files have been moved, re-open Mail
    This should re-load all your email messages, updating/restoring the count
    While this works, it does not explain the reason the count goes missing, nor does it ensure that the count won't go missing again in the future, but at least it's a temporary workaround.

  • Why will this not work for combo box

    I need to know why this will not work a combobox but it works for text fields. Isay ther is an error in the doc.createTextNode.
    Please any help would be great.
    Thanks
    // Repeats for each Element in the User Configuration.
    item = doc.createElement("COMPANY_NAME"); // Create element
    item.appendChild( doc.createTextNode(SetupCompanyNameJText.getText()) );
    UserConfig.appendChild( item ); // atach element to User Config element
    item = doc.createElement("INTIALS"); // Create element
    item.appendChild( doc.createTextNode(SetupIntialsjComboBox.getSelectedItem()) );
    UserConfig.appendChild( item ); // atach element to User Config element
    item = doc.createElement("FIRST_NAME"); // Create element
    item.appendChild( doc.createTextNode(SetupFirstNamejText.getText()) );
    UserConfig.appendChild( item );

    when I do that I end up with the following
    Error: #:300: class Configuration not found in class
    any ideas
    thanks

  • Why does this not work?

    Hi All,
    Take the following test code:
          1 import java.io.*;
          2
          3 public class GetFsSpace {
          4
          5     private String[] cmd = {"df"};
          6
          7     public static void main(String[] args) {
          8         GetFsSpace fs = new GetFsSpace();
          9         fs.runCmd();
         10     }
         11
         12     public void runCmd() {
         13
         14         try {
         15             Runtime rt = Runtime.getRuntime();
         16             Process proc = rt.exec(cmd);
         17             InputStream stdout = proc.getInputStream();
         18             InputStreamReader isr = new InputStreamReader(stdout);
         19             BufferedReader br = new BufferedReader(isr);
         20             String line = null;
         21             System.out.println("<Starting output.>");
         22
         23             while ( (line = br.readLine()) != null) {
         24                 System.out.println(line);
         25             }
         26
         27         } catch (Throwable t) {
         28             t.printStackTrace();
         29         }
         30     }
         31 }Now, this compiles and works fine, however, if I change the String in line 5 to read:
    private String[] cmd = {"df -k"};It throws an exception. So it's obviously to do with the string and I'm probably missing the obvious here, but can someone point me in the right direction?
    many thanks
    Doug.

    appologies, here's the exception I get when I run it:
    java -cp . GetFsSpace
    java.io.IOException: java.io.IOException: df -k: not found
            at java.lang.UNIXProcess.<init>(Unknown Source)
            at java.lang.ProcessImpl.start(Unknown Source)
            at java.lang.ProcessBuilder.start(Unknown Source)
            at java.lang.Runtime.exec(Unknown Source)
            at java.lang.Runtime.exec(Unknown Source)
            at GetFsSpace.runCmd(GetFsSpace.java:16)
            at GetFsSpace.main(GetFsSpace.java:9)and this only happens when I add the "-k" option to df.
    thanks.

  • Does this video work for everyone?

    my client is telling me the video on the home page doesn't
    work. it works fine for me. can everyone test it and tell me if its
    not working for you? and if not, what computer, os, browser you are
    using?
    http://www.mrrogershood.com
    thanks in advance,
    brad

    I don't know, but it works fine for me. I suspect changing
    the keyframe was
    important. But then I'm not a Flash expert. One thing you
    might do is make
    sure the client RELOADS the page so they're not seeing the
    cached old page.
    Also, the needs to be clicked twice, once to activate it, the
    other to start
    it. Maybe they're not doing that?
    Just some thoughts.
    MD
    Brhaynes75 wrote:
    > it works now????
    >
    > now im really confused. i did do a few things though. i
    used to have
    > the website in a "test" subdirectory, maybe the video
    was forwarding
    > to that. so i just left the
    test/images/_videos/index.swf there just
    > in case. i also opened up the flash file and tweaked a
    few things.
    > like, unlocking the layers and putting the opening stop
    action on a
    > keyframe instead of just a frame. i also changed the
    parameters in
    > the flash video to point to "/images/_videos/index.swf"
    instead of
    > "
    http://www.mrrogershood.com/images/_videos/index.swf".
    maybe one of
    > those worked? but the client is still telling me it
    doesn't work. =(

  • EVDRE: Sumparent. Does this only work when expanding down AND accross

    Dear Forum,
    I am trying to put together an input schedule that uses SUMPARENT to calculate all the parent values in the reportin grid. This seems to work ok when I expand on row and columns but stops working when I expand on Rows only. Does anyone know why this may be happening or experienced this before and found a workaround
    best regards
    Azim

    Hey Azim
    This thread is a bit old so not sure if you have worked this out as if you have it'd be awesome.
    I'm having this same issue and the only thing I can get to work is if I have a dynamic dimension in both my rows and my columns, then I can get sumparent to put in the formulas.
    If however I don't meet that criteria or I refer to SELF in a dimensino it doesn't work.
    So for the time being I have a work around that after the refresh button is pressed (I imbedded one in the worksheet) then it runs a piece of code that finds all the calculated members and places a formula in there.  But I'm sure there is a better way to do this, if you have come across one that'd be much appreciated
    Thanks
    Jason

  • Why does exchange server work for MSN Mail on iPad and not on Mac Mini?

    My MSN Mail works great on my iPad and iPhone but will not work on my Mac Mini? I input the same server address but it will not connect. I've even tried m.hotmail.com, etc. but not joy.
    Any ideas please?

    At the moment the only way to do this between a Mac and iPad with Outlook/Hotmail would be if you used webmail on the Mac. Anything you do in webmail would be shown on the iPad and vice versa.
    It used to be possible with the free GMail to use IMAP on the Mac and ActiveSync on the iPhone/iPad which would have been the sort of solution you are looking for. Now with the free GMail you have to use IMAP on the iPhone/iPad as well (ActiveSync is no longer available in the free GMail). IMAP would sync the changes still.
    Unfortunately as IMAP is not available for Outlook.com/Hotmail you cannot do the samething as a workaround.
    You could get a free GMail account and have it collect all your Hotmail messages, then you could use IMAP on both.

  • Why does genius never work for me?

    I have recently purchased a new iMac.  I love my new computer.  It took me some time to transfer all my songs etc, but icloud really helped.  my itunes library now has all my music in it, plus some new albums I have treated myself too.  For some reason I cannot seem to create a genius playlist, every time i try it tells me "genius is unavaliable for the song".  but seriously, i have tried it now for about 25 different songs, it cant be unavaliable for everything? Am I doing something wrong? is their a glitch?  I have updated genius several times, so thats deffinately not the porblem.  Rather confused, and a bit dissapointed in genius.
    Anybody else having the same problems?

    just as equally, what does your comment have to do with answering my question?  I was simply just explaining my situation, Iam new to using the iMac and wondered if I was doing anything wrong.  But hey, Im new to using these forums, I guess I will remember in future not to share the full situation and just ask the question.  leasson learned...moving on.

  • Why does BTAHL7 Only works with Tutorial HL7 File?

    I have been trying for days to determine the issue.
    I've only been able to get the sample file in the end to end tutorial to work.  Every other HL7 file I try to parse, no matter the schema, doesn't work.  They all say "Data at the root level is invalid. Line 1, position 1."  and
    the file just goes through to the send pipe as it came in.  If I change to BTAHL72XPipelines I get "Reason: Message had parse errors, can not be serialized " Even though the schemas all exist in the application as they are suppossed to.  All
    I want to do is pass them through but I can't.  and the ACK/NACK statements all come through without errors and provide back to me the appropriate MHS with MSA = CA.
    I found a valid HL7 file online and tried it with the appropriate schema and even that doesn't work.
    MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|
    PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOE^JOHN^^^^|19480203|M||B|254 MYSTREET AVE^^MYTOWN^OH^44123^USA||(216)123-4567|||M|NON|400003403~1129086|
    NK1||ROE^MARIE^^^^|SPO||(216)123-4567||EC|||||||||||||||||||||||||||
    PV1||O|168 ~219~C~PMA^^^^^^^^^||||277^ALLEN MYLASTNAME^BONNIE^^^^|||||||||| ||2688684|||||||||||||||||||||||||199912271408||||||002376853
    Any thoughts?

    Yes, I get various events.  
    EventID 4136 on the BizTalk Accelerator for HL7, and Event ID 5720 & 5754 on BizTalk Server, all three saying the message had parse errors, can not be serialize.    Also on BizTalk Accelerator for HL7 I get 8706 saying 
    Unable to log message "Error happened in body during parsi..." to the event log due to exception: 
    "No connection could be made because the target machine actively refused it 127.0.0.1:4000".
    Can anyone get the above HL7 file to parse through?
    UPDATE:
    Okay, so the above error lead me to the link below which says to turn on the HL7 Logging service and then I received the following errors. 
    http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalksyn/archive/2009/07/02/no-connection-could-be-made-because-the-target-machine-actively-refused-it.aspx
    Error happened in body during parsing 
    Error # 1
    Alternate Error Number: 301
    Alternate Error Description: The message has an invalid first segment
    Alternate Encoding System: HL7-BTA
    Error # 2
    Segment Id: PID
    Sequence Number: 1
    Field Number: 5
    Error Number: 207
    Error Description: Application internal error
    Encoding System: HL79999
    Alternate Error Number: Z100
    Alternate Error Description: Trailing delimiter found
    Alternate Encoding System: HL7-BTA
    Error # 3
    Segment Id: PID
    Sequence Number: 1
    Field Number: 6
    Error Number: 207
    Error Description: Application internal error
    Encoding System: HL79999
    Alternate Error Number: Z100
    Alternate Error Description: Trailing delimiter found
    Alternate Encoding System: HL7-BTA
    Error # 4
    Segment Id: PID
    Sequence Number: 1
    Field Number: 18
    Error Number: 102
    Error Description: Data type error
    Encoding System: HL79999
    Error # 5
    Segment Id: PID
    Sequence Number: 1
    Field Number: 19
    Error Number: 207
    Error Description: Application internal error
    Encoding System: HL79999
    Alternate Error Number: Z100
    Alternate Error Description: Trailing delimiter found
    Alternate Encoding System: HL7-BTA
    Error # 6
    Segment Id: NK1
    Sequence Number: 1
    Field Number: 1
    Error Number: 101
    Error Description: Required field is missing
    Encoding System: HL79999
    Error # 7
    Segment Id: NK1
    Sequence Number: 1
    Field Number: 2
    Error Number: 207
    Error Description: Application internal error
    Encoding System: HL79999
    Alternate Error Number: Z100
    Alternate Error Description: Trailing delimiter found
    Alternate Encoding System: HL7-BTA
    Error # 8
    Segment Id: NK1
    Sequence Number: 1
    Field Number: 34
    Error Number: 207
    Error Description: Application internal error
    Encoding System: HL79999
    Alternate Error Number: Z100
    Alternate Error Description: Trailing delimiter found
    Alternate Encoding System: HL7-BTA
    Error # 9
    Segment Id: PV1
    Sequence Number: 1
    Field Number: 3
    Error Number: 102
    Error Description: Data type error
    Encoding System: HL79999
    Error # 10
    Segment Id: PV1
    Sequence Number: 1
    Field Number: 3
    Error Number: 207
    Error Description: Application internal error
    Encoding System: HL79999
    Alternate Error Number: Z100
    Alternate Error Description: Trailing delimiter found
    Alternate Encoding System: HL7-BTA
    Error # 11
    Segment Id: PV1
    Sequence Number: 1
    Field Number: 7
    Error Number: 207
    Error Description: Application internal error
    Encoding System: HL79999
    Alternate Error Number: Z100
    Alternate Error Description: Trailing delimiter found
    Alternate Encoding System: HL7-BTA

Maybe you are looking for

  • Proxy Maximum Payload size

    Hi , What is the maximum size of payload a proxy ( ABAP server/client) can handle in XI?  Also send me docs on Proxy Sizing ? Regards, Praveen Kumar

  • Upgrade from XI 3.0 to PI 7.1 Test plan

    Hi All,   We are in the process of upgrading our XI server from XI 3.0 to PI 7.1.  Our landscape is connection different Non-sap system(web, FTP, JDBC) and with different sap system.  we need to have concrete test plan before upgrading from XI 3.0 to

  • Crystal Report 2008 [CR Developer] version - connectivity issue

    Hi Folks, I am not sure this is right forum to post my question, after a long research I found this forum. Year ago I developed proto type reports in Crystal 11.5 version and integrated with Power Builder 11.5 to our client. It took almost a year to

  • Export WebI Report in others formats

    Hi, Is there any way to export a WebI report in HTML format. Current only the following output format options are available while scheduling a WebI report: 1) Web Intelligence 2) Microsoft Excel 3) Adobe Acrobat thanks!!!

  • System Crashs / Freezes in Games with Audigy 2 ZS b

    Hello, I can play any Game 5 min , then the Computer frezze and i must restart. I tried any pci slots, no chance My System: AMD 64 3500+ Winchester MSI K8N Diamond Kingston HyperX 024MB Geforce 6600GT I follow the Tip with the System..from ACPI Unipr