Application to read 2 log files from internet

Hi,
Anybody could tell me how to develop this project. I'm lack of time. thanks
You have been asked into a company called Broken Arrow Software as a Senior Software Engineer and Management consultant. You are being paid very handsomely and have been asked to write an application program in Java for parsing a log file.
� The program will have a standard menu using the AWT only.
� ALL LAYOUTS MUST USE ONLY THE BORDER-LAYOUT OR GRID-LAYOUT OR A COMBINATION OF BOTH (Any other layouts score zero).
This application reads two Log files from the internet. The first file contains USA state names and the abbreviation used for that state. This information will be used in displaying totals from another network file and should be stored in an array (or two arrays, or a two dimensional array) in the program. The second file should extract the �Reversed subdomain� section from a Log file (a section is shown later) and store this in an array in the application. This should be processed and only those domains beginning with �us.� should be processed. Each �us.� Has an abbreviated USA state after it (�tx� is an abbreviation for Texas). The abbreviations are sorted and all states are on consecutive lines and each displays a number of accesses for that state. The accesses should be totalled and displayed in the current Frame for each state in the form of Java List components (these do not need to be synchronised so that they all scroll in unison).
The application will be a Java application with the following menus and MenuItems:
� Splash screen (10%)
� Application (20%)
o Open USA abbreviation file
o Clear screen
o Exit
� File (25%)
o Open network log file
o Open locally saved report file
o Recent report files
o Save as report file
� Graph (20%)
o Plot
� Help (15%)
o Help on Application
o About
A basic pass for the application will be for a basic implementation of an application with �help� options and some basic implementations of a Splash screen and some basic file and application options. Very high marks will be awarded for processing network files, saving and opening files, very good HCI, application design and error handling, excellent OO design for classes, gorgeous layout and commenting of code and excellent graphing capabilities.
Error handling dialogs and overall application design (10%)
Every class must be in a separate file.
Inheritance should be used for WindowListeners of Frames and Dialogs.
Up to 10% can also be lost by unprofessional code layout and lack of professional standards. Always adhere to standards taught throughout the module and your time at the University of Northumbria.
Examples of non-professionalism would include bad indentation, no comments, meaningless variable names, politically incorrect graphics, commented out code, empty .java files, .java files which are not part of the project etc. Remember your application is your livelihood and your company depends on your application standards.
The splash screen must be a Frame with a Canvas as part of it showing your own logo. Your logo should be individual to you but does not need to win the computing equivalent of the Turner prize. The application should be displayed behind the Splash screen and both should be visible. The application must not be able to be brought to the front and used without the Splash screen being disposed of.
The application should only enable the �Open USA abbreviation file�, �Open locally saved report file�, �Help� options and �Exit� Menus and MenuItems, when the application starts. On opening a valid USA abbreviation file, then the other Menus and MenuItems should be enabled.
The abbreviations should be read into an array. These should be used in displaying the totals for the reversed subdomain totals for each USA state. A total for all USA states should be displayed at the bottom of the current Frame, with a suitable Label (this design is your own). This current Frame should display a series of Lists starting with a List of USA state number (1 to n). A List of USA state abbreviation should be next followed by a List of the actual USA state name, followed by a List of the total accesses for that state.
The report file should be an ASCII file that can be printed out from an ASCII text editor such as DOS edit or Microsoft NotePad.
The �Open� network files should display a Dialog asking for the http:// address of the file, with �OK� and �Cancel� options. It is helpful if the user can hit �return� instead of clicking on �OK� and �Escape� instead of �cancel�. Error Dialogs should be used to indicate any errors that may occur and the state of the application should be reset to that of before displaying the Dialog.
When �Save as report file� is chosen a FileDialog box should be used for the user to choose both directory and filename. The file should be able to be saved as a �.rpt� file.
Open report file should display the report in a Frame; the design of which is your own.
Plotting the graph should pass a two dimensional array to a Frame with a Canvas. The Canvas should have a Paint method that draws the axis for the graph and any suitable Headings etc. The graph should draw a histogram of totals per USA states. The graph design is your own but you may wish to use Microsoft Excel as a good example of drawing a histogram.
The �Clear screen� option should clear any data off the current screen.
The �Exit� option should quit the application but it may be helpful to ask the user if they really want to exit the application.
Help must be Java code and not linking into HTML. It should display help in a well designed screen. The most basic implementation might use a scrollable TextArea for a basic mark.
See other software for a good �About� screen. The most basic should display your name, date, version and company.
� Help should display your help on using the application. As a senior software engineer, the design is your own, based on experience of using applications, as is the opening splash screen. You may use other applications for inspiration only, as these will make up your experience.
� Your good knowledge gained from HCI units studied should prove invaluable in the interface design and the usability of the application.
� The design (Screens and classes) and quality and documentation of code throughout the application will be marked. The experience gained from programming 1 and 2 and Object Oriented Programming should prove invaluable throughout the application, as should any GUI units studied.
The log file can be accessed at:
http://computing.unn.ac.uk/staff/cgpb2/public_html/log.html

You would really gain ever so much more from this exercise if you would write a couple of classes, then come back with some specific questions. If you're completely lost, try starting with the GUI first. It's not the best practice, always, but it is easy to visualize.
On a side note, I wish I'd had assignments even half this intersting when I was in my Java classes...

Similar Messages

  • Can't read log files from /var/log with Geany

    With the few exeptions like hibernate.log, I can't read most of those files, including:
    everything.log
    errors.log
    kernel.log
    messages.log
    syslog.log
    When I try to open them (as root), all I get is
    The file xxx.log does not look like a text file or the file encoding is not supported.
    However, they do open with nano
    Last edited by Lockheed (2013-06-20 14:20:11)

    If you want to only view the files (I assume this since those are logs), maybe try
    $ less -M <file>
    You can navigate pretty well with it (e.g. go to a specific line).
    Edit:
    You could also try to find if there is an option in Geany that would allow you to see "non-text" files.
    Last edited by msthev (2013-06-20 18:41:27)

  • Regarding Reading the file from Application Server

    Hi,
    I am trying to read data from Application Server but due to special characters it is getting dumped out.
    US24,Q,Acero (Carbon),AA,0010,0001,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),AA,0010,0002,01,Area rectificada sin da#os ra
    US24,Q,Acero (Carbon),AA,0010,0003,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),CD,0010,0001,01,ITPE Soken para verificacion
    US24,Q,Acero (Carbon),CD,0010,0010,01,No se permite desprendimiento
    US24,Q,Acero (Carbon),CD,0010,0002,01,"Vernier, cinta metrica"#
    In the last line it is going into dump due to special character ".
    Please suggest.
    Thanks
    Priyanka.

    Hi,
    You can check the mode in which you are reading the file
    from application server that is
    Open Dataset in Binary or Text Mode.
    Hope it helps
    Regards
    Mansi

  • FM to read XML files from Application server in ECC5.0

    Hi All,
    We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files.
    Now we need to read the XML file contents of MM01 and upload into SAP Data Base through BAPI
    I need to know about the Function modules to read XML files from Application Server and also about the FM's that will update the Date base tables with the data obtained form XML files.
    Regards
    Prathima

    Parsing XML data:
    http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
    or alternatively check out ABAP online help for "CALL TRANSFORMATION".
    For creating the material master look at BAPI_STANDARDMATERIAL_CREATE.
    Thomas

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • What are the commands available to read a file from application server and

    What are the commands available to read a file from application server and store the file into an internal table?

    Hi,
    To read a file from an Application Server to an Object there is a command in ABAP called <b>READ DATASET</b>. After that file is transported to that object you have to do a loop and put that data in an Internal Table.
    This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file.
    For dset, a character-type data object is expected - that is, an object that contains the platform-specific name of the file. The content is read from the file starting from the current file pointer. After the data transfer, the file pointer is positioned after the section that was read. Using the MAXIMUM LENGTH addition, the number of characters or bytes to be read from the file can be limited. Using ACTUAL LENGTH, the number of characters or bytes actually used can be determined.
    In a Unicode program, the file must be opened with an arbitrary access type; otherwise, an exception that cannot be handled will be triggered.
    If the file has not yet been opened in anon-Unicode program, it will be implicitly opened as a binary file for read access using the statement
    OPEN DATASET dset FOR INPUT IN BINARY MODE.
    . If a non-existing file is accessed, an exception that can be handled can be triggered.
    Influence of Access Type
    Files can be read independently of the access type. Whether data can be read or not depends solely on the position of the file pointer. If the latter is at the end of the file or after the file, no data can be read and sy-subrc will be set to 4.
    Influence of the Storage Type
    The import function will take place irrespective of the storage type in which the file was opened with the statement OPEN DATASET.
    If the file was opened as a text file or as a legacy text file, the data is normally read from the current position of the file pointer to the next end-of-line marking, and the file pointer is positioned after the end-of-line marking. If the data object dobj is too short for the number of read characters, the superfluous characters and bytes are cut off. If it is longer, it will be filled with blanks to the right.
    If the file was opened as a binary file or as a legacy-binary file, as much data is read that fits into the data object dobj. If the data object dobj is longer than the number of exported characters, it is filled with hexadecimal 0 on the right.
    If the specified storage type makes conversion necessary, this is executed before the assignment to the data object dobj. Afterwards, the read data is placed, byte by byte, into the data object.
    System Fields
    sy-subrc Meaning
    0 Data was read without reaching end of file.
    4 Data was read and the end of the file was reached or there was an attempt to read after the end of the file.
    Thanks,
    Samantak.
    <b>Rewards points for useful answers.</b>

  • Reading XML file from application server and  put into internal table-4.6C

    Dear All,
    Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest.
    Thanks and regards,
    Atanu

    Hi Atanu!
    Simply use the XSLT transformation 'ID'.
    FIELD-SYMBOLS <ls_result> TYPE ANY.
    CREATE DATA lref_data TYPE (your_structure).
    ASSIGN lref_data->* TO <ls_result>.
    CALL TRANSFORMATION id
                        SOURCE XML xmlstr
                        RESULT result = <ls_result>.
    "xmlstr" contains your XML file. Just read it into it via standard I/O operations. "<ls_result>" will contain your DDIC formatted content.
    Best regards
    Torsten

  • Not recognizing # while reading the file from application server

    Hi
    I am reading a file from application server. While reading into internal table with read statement the last field in each record is filling with hash symbol in the last digit. If I write any if condition with HASH symbol its not going inside the if condition, means its not recognizing as hash may be its internally treating as some other. I need to remove the hash from that field. How I can do that.
    Thanks,
    kishore

    I faced exact situation. Yes, internally its treated as some other special character. What i did was, becuase hash symbol was always coming at the end...i created a dummy field in my internal table so that it will not interfere with my actual data. When i see the data in my internal table, the hash always falls in the last field (dummy) which i will ignore. I could not get solution to remove this hash so i adopted this approach and it worked!!
    Hope it helps,
    SKJ

  • Function module to read xml files from application server

    Hi experts,
            I need to read  xml files from application server to sap. Is the any siutable function moldule for that?

    Hi Cenosure,
    Donno about FM which will upload data directly to SAP, I think you have to do some mapping for it so that it will suit the SAP format. Again it depends on your requirement..
    Please elaborate more about your requirement.
    Please have a look on below FM
    TEXT_CONVERT_XML_TO_SAP
    Also search on SCN there are many threads on the same topic available.
    http://abapreports.blogspot.com/2008/09/upload-xml-file-from-application-server.html
    This is the link which will give you the Code
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
    Use this XML file to Upload the same, this Program will work for your XML file also,
    http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/input_xml.xml
    See the below thread also
    Upload XML to internal table and vice versa in SAP 4.6C
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Adobe Reader will not read pdf files on internet

    I have lastest version of Adobe reader on a new mac running OS 10 Maverick. This has latest safari (7.0.1) as my internet browser. My adobe reader reads pdf files already present on my desktop, but will not read pdf files from the internet even after I allow "trust" this site. Can anyone help me to resolve the issue please. Is it a bug that Adobe has not solved??

    Sorry if you did not understand my instructions.
    Regarding bullet point 4: Check Reader >Preferences > Internet > Web Browser Options> The blessed app should be " /Applications/Adobe Reader.app"
    You specified that you don't see the path, then it might be some problem in your installation.
    Please see the attached image and let me know what you see on your system.
    Regarding bullet point 5: Load PDF in Safari.
    This means open any PDFs in Safari web browser.
    Please make sure the below highlighted plug-ins are installed on your system by going to the specified path. And make sure the version of the below two plug-ins are 11.0.06. You can find the version by selecting the plugin and hit Command+i.
    Go to your Main Hard Disk/Library/ Internet Plug-Ins/ AdobePDFViewerNPAPI.plugin
    Go to your Main Hard Disk/Library/ Internet Plug-Ins/ AdobePDFViewer.plugin
    Please let me know if these help.
    Thank You

  • Can t download files from internet to my Ally

    i ve had my Ally less than week.......when i try to download files from internet i get error msg that download failed.....i tried to click link and hold link and choose save and still download fails........help me.......please

    Try to Clear your Temporary Internet Files and Cookies. To delete your temporary internet files on the Lg Ally follow the directions below:
    From the Home screen, touch the applications tab (bottom of the screen).
     Touch Browser.
    Press the Menu key.
    Touch More
    Touch Settings.
    Touch Clear cache.
    Some visited website content stored on the device. The cache enables the browser to download only the content that has changed since the last time a website was visited. Since the browser only downloads changed content, pages are loaded faster.
    Touch OK.
    Touch Clear history.
    A listing of URLs (website addresses) that have been recently visited.
    Touch OK.
    Touch Clear all cookie data.
    Some visited website content stored on the device. The cache enables the browser to download only the content that has changed since the last time a website was visited. Since the browser only downloads changed content, pages are loaded faster.
    Touch OK.
    You can also find this information on the Verizon Wireless website HERE
    Hope this helps!

  • How can I read pdf files from LabVIEW with different versions of Acrobat reader?

    How can I read pdf files from LabVIEW with different versions of Acrobat reader?
    I have made a LabVIEW program where I have possibility to read a PDF document.  When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
    It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
    The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
    Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
    This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
    Jan Inge Gustavsen
    Attachments:
    Show PDF-file - Adobe Reader 7-0-5 - LV61.vi ‏43 KB
    Read PDF file.jpg ‏201 KB
    Show PDF-file - Adobe Reader 5-0-5 - LV61.vi ‏42 KB

    hi there
    try the vi
    ..vi.lib\platform\browser.llb\Open Acrobat Document.vi
    it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How do I getr my CS5 to read RAW files from my new Panosonic DMC FZ200?

    My Adobe CS5 can't read RAW files I'm attempting to PP in it from two new cameras. What  good is having software that is suppose to be able to read RAW files when it won't for new equipment. Surely it should be able to adapt to newer  cameras as they come along.Today I tried downloading a sample RAW file from a online review of the new Canon 5D Mark iii. It starts to open in CS5 but then says it can't read RAW files from this camera either. How do I change that in my Photoshop CS5. I havn't tried it in Elements 10 yet. will it do the same thing and will I need to change the settings there too? I can post process RAW files from my Canon XSi  and XTi  without any problem.

    What  good is having software that is suppose to be able to read RAW files when it won't for new equipment. Surely it should be able to adapt to newer  cameras as they come along.
    What Noel said.
    FYI, Adobe is constantly supporting new cameras with new versions of Camera Raw.
    http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html
    But you must upgrade your version of Photoshop in order to run the latest versions of Camera Raw to read Raw files from the latest released camera models. Or join the Cloud and you can keep your software current at all times as part of your membership.
    http://helpx.adobe.com/x-productkb/global/camera-raw-compatible-applications.html
    Or run the free Adobe DNG converter, convert all Raw files to DNG then edit the DNGs in Photoshop
    http://www.adobe.com/products/photoshop/extend.displayTab2.html
    Win: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5519
    Mac: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5518
    DNG conversion requires extra steps - but it's free.

  • Capturing log files from multiple .ps1 scripts called from within a .bat file

    I am trying to invoke multiple instances of a powershell script and capture individual log files from each of them. I can start the multiple instances by calling 'start powershell' several times, but am unable to capture logging. If I use 'call powershell'
    I can capture the log files, but the batch file won't continue until that current 'call powershell' has completed.
    ie.  within Test.bat
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > a.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > b.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > c.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > d.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > e.log 2>&1
    timeout /t 60
    start powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > f.log 2>&1
    the log files get created but are empty.  If I invoke 'call' instead of start I get the log data, but I need them to run in parallel, not sequentially.
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > a.log 2>&1
    timeout /t 60
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > b.log 2>&1
    timeout /t 60
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > c.log 2>&1
    timeout /t 60
    call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > d.log 2>&1
    timeout /t 60call powershell . \Automation.ps1 %1 %2 %3 %4 %5 %6 > e.log 2>&1
    Any suggestions of how to get this to work?

    Batch files are sequential by design (batch up a bunch of statements and execute them). Call doesn't run in a different process, so when you use it the batch file waits for it to exit. From CALL:
    Calls one batch program from another without stopping the parent batch program
    I was hoping for the documentation to say the batch file waits for CALL to return, but this is as close as it gets.
    Start(.exe), "Starts a separate window to run a specified program or command". The reason it runs in parallel is once it starts the target application start.exe ends and the batch file continues. It has no idea about the powershell.exe process
    that you kicked off. Because of this reason, you can't pipe the output.
    Update: I was wrong, you can totally redirect the output of what you run with start.exe.
    How about instead of running a batch file you run a PowerShell script? You can run script blocks or call individual scripts in parallel with the
    Start-Job cmdlet.
    You can monitor the jobs and when they complete, pipe them to
    Receive-Job to see their output. 
    For example:
    $sb = {
    Write-Output "Hello"
    Sleep -seconds 10
    Write-Output "Goodbye"
    Start-Job -Scriptblock $sb
    Start-Job -Scriptblock $sb
    Here's a script that runs the scriptblock $sb. The script block outputs the text "Hello", waits for 10 seconds, and then outputs the text "Goodbye"
    Then it starts two jobs (in this case I'm running the same script block)
    When you run this you receive this for output:
    PS> $sb = {
    >> Write-Output "Hello"
    >> Sleep -Seconds 10
    >> Write-Output "Goodbye"
    >> }
    >>
    PS> Start-Job -Scriptblock $sb
    Id Name State HasMoreData Location Command
    1 Job1 Running True localhost ...
    PS> Start-Job -Scriptblock $sb
    Id Name State HasMoreData Location Command
    3 Job3 Running True localhost ...
    PS>
    When you run Start-Job it will execute your script or scriptblock in a new process and continue to the next line in the script.
    You can see the jobs with
    Get-Job:
    PS> Get-Job
    Id Name State HasMoreData Location Command
    1 Job1 Running True localhost ...
    3 Job3 Running True localhost ...
    OK, that's great. But we need to know when the job's done. The Job's Status property will tell us this (we're looking for a status of "Completed"), we can build a loop and check:
    $Completed = $false
    while (!$Completed) {
    # get all the jobs that haven't yet completed
    $jobs = Get-Job | where {$_.State.ToString() -ne "Completed"} # if Get-Job doesn't return any jobs (i.e. they are all completed)
    if ($jobs -eq $null) {
    $Completed=$true
    } # otherwise update the screen
    else {
    Write-Output "Waiting for $($jobs.Count) jobs"
    sleep -s 1
    This will output something like this:
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    Waiting for 2 jobs
    When it's done, we can see the jobs have completed:
    PS> Get-Job
    Id Name State HasMoreData Location Command
    1 Job1 Completed True localhost ...
    3 Job3 Completed True localhost ...
    PS>
    Now at this point we could pipe the jobs to Receive-Job:
    PS> Get-Job | Receive-Job
    Hello
    Goodbye
    Hello
    Goodbye
    PS>
    But as you can see it's not obvious which script is which. In your real scripts you could include some identifiers to distinguish them.
    Another way would be to grab the output of each job one at a time:
    foreach ($job in $jobs) {
    $job | Receive-Job
    If you store the output in a variable or save to a log file with Out-File. The trick is matching up the jobs to the output. Something like this may work:
    $a_sb = {
    Write-Output "Hello A"
    Sleep -Seconds 10
    Write-Output "Goodbye A"
    $b_sb = {
    Write-Output "Hello B"
    Sleep -Seconds 5
    Write-Output "Goodbye B"
    $job = Start-Job -Scriptblock $a_sb
    $a_log = $job.Name
    $job = Start-Job -Scriptblock $b_sb
    $b_log = $job.Name
    $Completed = $false
    while (!$Completed) {
    $jobs = Get-Job | where {$_.State.ToString() -ne "Completed"}
    if ($jobs -eq $null) {
    $Completed=$true
    else {
    Write-Output "Waiting for $($jobs.Count) jobs"
    sleep -s 1
    Get-Job | where {$_.Name -eq $a_log} | Receive-Job | Out-File .\a.log
    Get-Job | where {$_.Name -eq $b_log} | Receive-Job | Out-File .\b.log
    If you check out the folder you'll see the log files, and they contain the script contents:
    PS> dir *.log
    Directory: C:\Users\jwarren
    Mode LastWriteTime Length Name
    -a--- 1/15/2014 7:53 PM 42 a.log
    -a--- 1/15/2014 7:53 PM 42 b.log
    PS> Get-Content .\a.log
    Hello A
    Goodbye A
    PS> Get-Content .\b.log
    Hello B
    Goodbye B
    PS>
    The trouble though is you won't get a log file until the job has completed. If you use your log files to monitor progress this may not be suitable.
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • How to delete archive log files from ASM through Grid Control

    Hi
    Anybody suggest me how to delete archive log files from ASM through Grid Control.
    Thanks

    It is important to specify both, the oracle version and os version when posting, so confusions can be avoided.
    In this particular case, since you are referring to asm and grid control you could be talking about either 10gR1, 10gR2 or 11gR1; but I strongly suggest you to avoid us to be guessing. In either case, you sould go to the maintenance tab of the target database and program a scheduled 'delete noprompt obsolete;' procedure. This will purge the information stored at the Flash recovery area, which I assume you have declared inside the ASM.
    ~ Madrid
    http://hrivera99.blogspot.com/

Maybe you are looking for

  • How to check multiple special characters in instr function sql query.

    Hi, The following special characters are comma(,), slash(/), colan(:) these special characters i need to be check in instr function. select SUBSTR(master_title,1,INSTR(master_title,',',1,1)-1) from dual; Can you please write the query with right answ

  • Message Tracking for Outgoing TLS messages

    I would like to monitor outgoing messages to a certain domain that we use the TLS protocol. I have looked at the message log, and can find each message for that domain, but it does not show anything regarding the protocol used. Is there any way to co

  • Re: B2B Customer Protocol Inbound Operation

    Hi All, It was a very good discussion. I am also facing the same problem. B2B-50029:  B2B runtime error: oracle.xml.parser.v2.XMLParseException: Start of root element expected. So, I do need to change the ecs file in order to get problem resolved. Is

  • Error during report execution ( REP-271468672: )

    Hi, Following error is encountered during execution of report on Reports 9i... Terminated with error: <br>REP-271468672: Unable to create a temporary file. I have checked space and permissions of temporary folder. Please help on same Regards/- Neeraj

  • Only the InternalFrame should be active not its parent

    hai friends, i hope some of u have answer to my situation. i have a JInternalFrame on a JDesktopPane upon activiting the JInernalFrame only the internalframe should be active only when the internalframe is closed we should be abel to access the JDesk