List processing question

I'll start by describing what I'm trying to do. I have a list of html files that is a subset of a directory tree of other html files. I'm looking for a way to find the complement of my list of files. Here's an example:
All files:
./d1/f1.html
./d1/f2.html
./d1/f3.html
./d2/fa.html
./d2/fb.html
./d2/fc.html
A subset of the above list that I have:
./d1/f3.html
./d2/fa.html
Compliment of above subset that I would like to find:
./d1/f1.html
./d1/f2.html
./d2/fb.html
./d2/fc.html
How would I find the above complement of the 1st subset? Is there a way using diff? I could create a perl hash of the whole list, merge the 1st subset, then delete the duplicates, but that seems a little over the top. Just feels like I'm overlooking a simpler solution.
Thanks for any pointers.
Cole

Cole Tierney wrote:
When considering diff, I wasn't sure if the order of the list would matter and it seems that it doesn't. Thanks Camelot!
I think I spoke too soon. I added a pipe to sort after the find thinking it would change the order, but it didn't. Piping through sort -r gives me diffferent results. But I think that's what you meant by your last note:
"the subset file would need to have the files in exactly the same format that find would list them"
Just for fun here's a little perl script that I eluded to that also helped (I call it line_freq):
<pre style="padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 80ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #444; background: #eee; line-height: normal">#!/usr/bin/perl
# A simple perl script that counts occurances of each line in
# an array, sorts it, and prints it.
# I copied this from a tutorial I saw somewhere. (My appologies
# to the original author.) --CBT
my $seen=();
while (<>) {
$seen{lc $_}++;
foreach $line ( sort { $seen{$b} <=> $seen{$a} } keys %seen ) {
printf "%6d %s", $seen{$line}, $line;
</pre>
Then:
<pre style="padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 80ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #444; background: #eee; line-height: normal">(find . -type f -name '*\.html'; cat subset) | line_freq | sed -n 's/ *1 //p'</pre>
Cole
Message was edited by: Cole Tierney

Similar Messages

  • How to display list process, when i run sql*loader in c#

    Hello,
    How to display list process, when i run sql*loader in c#. I mean when i run sql*loader from cmd windows, i get list process how many row has been inserted. But when i run SQL*Loader from C#, i can't get process SQL*Loader.
    This is my code:
    string strCmd, strSQLLoader;
    string strLoaderFile = "XLLOAD.CTL";
    string strLogFile = "XLLOAD_LOG.LOG";
    string strCSVPath = @"E:\APT\WorkingFolder\WorkingFolder\sqlloader\sqlloader\bin\Debug\8testskrip_HTTP.csv";
    string options = "OPTIONS (SKIP=1, DIRECT=TRUE, ROWS=1000000,BINDSIZE=512000)";
    string append = "APPEND INTO TABLE XL_XDR FIELDS TERMINATED BY ','";
    string table = "OPTIONALLY ENCLOSED BY '\"' TRAILING NULLCOLS (xdr_id,xdr_type,session_start_time,session_end_time,session_last_update_time,session_flag,version,connection_row_count,error_code,method,host_len,host,url_len,url,connection_start_time,connection_last_update_time,connection_flag,connection_id,total_event_count,tunnel_pair_id,responsiveness_type,client_port,payload_type,virtual_type,vid_client,vid_server,client_addr,server_addr,client_tunnel_addr,server_tunnel_addr,error_code_2,ipid,c2s_pkts,c2s_octets,s2c_pkts,s2c_octets,num_succ_trans,connect_time,total_resp,timeouts,retries,rai,tcp_syns,tcp_syn_acks,tcp_syn_resets,tcp_syn_fins,event_type,flags,time_stamp,event_id,event_code)";
    strCmd = "sqlldr xl/secreat@o11g control=" + strLoaderFile + " LOG=" + strLogFile;
    System.IO.DirectoryInfo di;
    try
    System.Diagnostics.ProcessStartInfo cmdProcessInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
    di = new DirectoryInfo(strCSVPath);
    strSQLLoader = "";
    strSQLLoader += "LOAD DATA INFILE '" + strCSVPath.ToString().Trim() + "' " + append + " " + table;
    StreamWriter writer = new StreamWriter(strLoaderFile);
    writer.WriteLine(strSQLLoader);
    writer.Flush();
    writer.Close();
    // Redirect both streams so we can write/read them.
    cmdProcessInfo.RedirectStandardInput = true;
    cmdProcessInfo.RedirectStandardOutput = true;
    cmdProcessInfo.UseShellExecute = false;
    cmdProcessInfo.LoadUserProfile = true;
    //System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
    // Start the procses.
    System.Diagnostics.Process pro = System.Diagnostics.Process.Start(cmdProcessInfo);
    // Issue the dir command.
    pro.StandardInput.WriteLine(strCmd);
    // Exit the application.
    pro.StandardInput.WriteLine("exit");
    //Process[] processlist = Process.GetProcesses();
    //foreach(Process pro in processlist){
    Console.WriteLine("Process: {0} ID: {1}", pro.ProcessName, pro.Id);
    Console.WriteLine(pro.StandardOutput.ReadLine());
    // Read all the output generated from it.
    string strOutput;
    strOutput = pro.StandardOutput.ReadToEnd();
    pro.Dispose();
    catch (Exception ex)
    return;
    finally
    Thanks.

    friend
    sqlldr is an application residing in the OS. procedure runs in the dbms engine.
    you cannot run an os command directly from a procedure or a function or a package .
    If you want to do so you need to use either a daemon process created by a PRO*C program
    or a JAVA stored procedure to do so.
    just refer to previous question forums, you can find the solution. Somebody has already given a solution using
    java to run an OS command . check it out
    prakash
    [email protected]

  • Sales process- questions

    Hi SAP Prof,
    Iam a fresher and joined in SAP Company. and we r dealing with power batteries , The client is sells the batteries to other customers , for govt bodies, export sales, OEM Sales r there.
    My question is that
    I want a list of questions on the topic , sales process, From Inquiry to Billing.  i.e., inquiry, quotation, order, delvry, PGI, Billing.
    Here in this sales process. , what might be the questions can be asked nearly 10 questins r expected as per clients reqt.
    I think u have to understood my question

    Hi SAP Prof,
    Iam a fresher and joined in SAP Company. and we r dealing with power batteries , The client is sells the batteries to other customers , for govt bodies, export sales, OEM Sales r there.
    My question is that
    I want a list of questions on the topic , sales process, From Inquiry to Billing.  i.e., inquiry, quotation, order, delvry, PGI, Billing.
    Here in this sales process. , what might be the questions can be asked nearly 10 questins r expected as per clients reqt.
    I think u have to understood my question

  • ABAP list processing statements in ABAP Objects

    Hi,
    Based on the Online help "The ABAP statements used for list processing are not yet fully available in ABAP Objects".
    Is there any chnage planned about this for the next WAS release?
    Thanks,
    Peter

    Hi Peter
    I believe, most of the measures taken are for some compatibility and performance issues. So, there is no need to expect great changes about this.
    *--Serdar

  • Print List Processing Report to PDF

    hi all,
    i've read many forums about convert info into PDF. but i'm very new to understand those forums.
    In case I want to print list processing report as PDF (not hard copy thru printer). First, user types the data on the screen then click on 'Execute' button, then the system shows the result on screen. After that user asks system for print the screen on menu bar by List=>Print.
    So please advise me how to get the spool id, then export as pdf. As my opinion, i may use CONVERT_ABAPSPOOLJOB_2_PDF and GUI_DOWNLOAD. But where is the place I should put the methods on?
    Thanks in advance.
    Peerasit

    Hi,
    Go through The simple Anallise this program.
    report zabap_2_pdf.
    *-- Enhancements: only allow to be run with variant.  Then called
    *-- program will be transparent to users
    *-- TABLES
    tables:
      tsp01.
    *-- STRUCTURES
    data:
      mstr_print_parms like pri_params,
      mc_valid(1)      type c,
      mi_bytecount     type i,
      mi_length        type i,
      mi_rqident       like tsp01-rqident.
    *-- INTERNAL TABLES
    data:
      mtab_pdf    like tline occurs 0 with header line,
      mc_filename like rlgrap-filename.
    *-- SELECTION SCREEN
    parameters:
      p_repid like sy-repid, " Report to execute
      p_linsz like sy-linsz default 132, " Line size
      p_paart like sy-paart default 'X_65_132'.  " Paper Format
    start-of-selection.
    concatenate 'c:\'
                p_repid
                '.pdf'
      into mc_filename.
    *-- Setup the Print Parmaters
      call function 'GET_PRINT_PARAMETERS'
       exporting
         authority= space
         copies   = '1'
         cover_page                   = space
         data_set = space
         department                   = space
         destination                  = space
         expiration                   = '1'
         immediately                  = space
         in_archive_parameters        = space
         in_parameters                = space
         layout   = space
         mode     = space
         new_list_id                  = 'X'
         no_dialog= 'X'
         user     = sy-uname
       importing
         out_parameters               = mstr_print_parms
         valid    = mc_valid
       exceptions
         archive_info_not_found       = 1
         invalid_print_params         = 2
         invalid_archive_params       = 3
         others   = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
      if mstr_print_parms-pdest = space.
        mstr_print_parms-pdest = 'LOCL'.
      endif.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      mstr_print_parms-linsz = p_linsz.
      mstr_print_parms-paart = p_paart.
      submit (p_repid) to sap-spool without spool dynpro
                       spool parameters mstr_print_parms
                       via selection-screen
                       and return.
    *-- Find out what the spool number is that was just created
      perform get_spool_number using sy-repid
                 sy-uname
        changing mi_rqident.
    *-- Convert Spool to PDF
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid= mi_rqident
          no_dialog  = space
          dst_device = mstr_print_parms-pdest
        importing
          pdf_bytecount                  = mi_bytecount
        tables
          pdf        = mtab_pdf
        exceptions
          err_no_abap_spooljob           = 1
          err_no_spooljob                = 2
          err_no_permission              = 3
          err_conv_not_possible          = 4
          err_bad_destdevice             = 5
          user_cancelled                 = 6
          err_spoolerror                 = 7
          err_temseerror                 = 8
          err_btcjob_open_failed         = 9
          err_btcjob_submit_failed       = 10
          err_btcjob_close_failed        = 11
          others     = 12.
    call function 'DOWNLOAD'
         exporting
              bin_filesize            = mi_bytecount
              filename                = mc_filename
              filetype                = 'BIN'
         importing
              act_filename            = mc_filename
         tables
              data_tab                = mtab_pdf.
          FORM get_spool_number *
          Get the most recent spool created by user/report              *
    -->  F_REPID               *
    -->  F_UNAME               *
    -->  F_RQIDENT             *
    form get_spool_number using f_repid
         f_uname
                    changing f_rqident.
      data:
        lc_rq2name like tsp01-rq2name.
      concatenate f_repid+0(8)
                  f_uname+0(3)
        into lc_rq2name separated by '_'.
      select * from tsp01 where  rq2name = lc_rq2name
      order by rqcretime descending.
        f_rqident = tsp01-rqident.
        exit.
      endselect.
      if sy-subrc ne 0.
        clear f_rqident.
      endif.
    endform." get_spool_number
    Regards
    swamy

  • ABAP Mapping - Message shown in Standard Change List Process Log

    Hi
    I am working with ABAP Mapping program. I had created ABAP class using ABAP workbench. Before this, in exchangeProfile..data was provided for com.sap.aii.repository.mapping.additionaltypes ==>> as " R3_ABAP|Abap-class;R3_XSLT|XSL (ABAP Engine) " and 'Saved'.
    In Interface Mapping, after providing the Class Name under 'Mapping Program' and activated. After activation (Standard Change List), it is showing the following messages under 'Processing Log'.
    --> Standard Change List - Process Log message
    Activation of the change list canceled Check result for Interface Mapping IM_ABAP_MAPPING | http://ABAP_Mapping_SREE:  Type R3_ABAP of
    program ZSREETEST is invalid because it is not registered in the exchange profile . Check the values for the exchange profile parameter
    IntegrationBuilder.Repository.com.sap.aii.repository.mapping.additionaltypes
    --> End of Log message
    Can some one please guide me in resolving the ABAP mapping issue.
    Thanks in advance.
    ..Sree

    Sree,
    The log says that there is ABAP mapping included in your exchange profile. Do the things what michal have told and also check your mapping program whether working fine or not in SXI_MAPPING transaction.
    You can see this weblog for reference:
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    ---Satish

  • List processing and PF status.

    Hi Team ABAP,
    i got a problem in List processing.
    I´m in a dypro with a table control on it. Users can mark one or more ALV lines and then e.G. press "process".
    Something gets done then (some forms get printed), and after that i want to display a protocol.
    First i tried to process a simple write list by using WRITE statement.
    Coding got processed, but it had no effect, no write list was generated, or at least not shown on my screen.
    So i tried to code a "LEAVE TO LIST PROCESSING" right before my first WRITE statement.
    Well, now it works my write list is on Screen. But here start the Problem. Like i got told in the ducomentation of the LEAVE TO LIST PROCESSING statement the WRITE list gets processed with the actual active PF status from the dynpro where i came from.
    1. This is quite uncool, since i do not need those Buttons in my List.
    2. Even if it was ok, those buttons are not working. Typing /h in OK_CODE field and pressing ENTER doesnt help it. When after that i click a button, nothing happens, such as if i didnt click them.
    I searched the forum, but i got drowned in thousands of "interactive list" threads and wasnt able to find my required info in an acceptable time of 30 minutes.
    Did i do a essential error? Someone got an Idea where i´m stuck or a proposal on how to improve?
    Any Help or tip will be welcome and rewared accordingly.
    regards

    Hi Florian,
    Try if you can display the list in ALV where you can maintain the pf-status.
    You can check the demo program  DEMO_LEAVE_TO_LIST_PROCESSING. In this, it is setting set pf-status to space.
    Hope it helps.
    Sujay

  • Leave to List processing is not working

    Hi all,
    I am displaying data in separate window using Window stratin at '' ''                                                                               
    ending at '' ''.
    in screen  PBO.
      SUPPRESS DIALOG.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      PERFORM output.
    everything is working fine.but its not showing the whole output .
    even if i scroll .
    what am i did wrong...?

    Hi,
    Its my bad, i am using
      CALL SCREEN 1000  STARTING AT 01 01
                       ENDING   AT 150 50.
    MODULE status_1000 OUTPUT.
      PERFORM include_exclude_function USING sy-dynnr.
      SET PF-STATUS 'AAA' EXCLUDING fcodes.
      SET TITLEBAR '1000'.
      SUPPRESS DIALOG.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      PERFORM output.
    ENDMODULE.                 " STATUS_8000  OUTPUT

  • Leave to list-processing doesn't work

    Hi 2 all!
    I have a problem with LEAVE TO LIST-PROCESSING. I have developed a module pool (type M) and screen with the screen painter of type Normal. Now I want to go to the report from my screen with LEAVE TO LIST-PROCESSING, but it doesn't work. I am trying to do this when the button is pressed ( at my application status). The operation is performed but then the Init_screen_xxxx module is called again. Highly appreciate your help.

    Hi Nata
    Yes U can do it.
    We go from module pool program to report program and vice-versa.
    1.  From report to screen (transaction)
           Call transaction
          Leave to list-processing and return to screen
    2.  From screen to list (report)
             we can write a report program for fuction key available in the screen.
              for example.
        case sy-ucomm.
          when 'fctcode'.
           select .......... from tabl   into ..
        write:/.........,
    endcase.
    reward if useful.

  • Short Dump During List processing

    Hi ,
    Problem Desc:
        A program when it runs in production has huge number of data to be displayed in the list .While doing the write statement the internal table(system assigned internal table for list processing '%_LIST') exceeds the memory limit and goes for dump.
    Please suggest for the following for finding a better solution, I am in 4.7 only
    1.Once the program reaches a maximum memory limit I have to clear the list from memory
    - so how to send the processed list to other persistent area like spool etc
    - How to clear the internal list memory allocation ( Any c functions , Class is available for it )
    - How to catch the memory used for the list process programmatically (for Internal table %_LIST)
    Thanks in advance
    Best regards,
    Raj

    Hi Raj,
    Why don't you go for prevention rather than cure?
    When the user selects the data ranges for the report, you could do a calculation to determine the size of the report and then ask them to restrict the criteria.  They could then run several reports rather than trying to do it all in one.
    I would guess that if you are running out of memory that the report must be HUGE.  Who is going to look at something that large?
    You could also increase the memory allocation to each work process (although this is a bit of a sledgehammer to crack a nut).
    As for your quesions:
    1. I'm not sure you can persist the spool yourself, and certainly not from within your program.  You could, however, spin off jobs from the main program which each had a portion of the overall data to process and thus each would generate a smaller spool (although collectively they would be the same size).
    2. As I don't think you can achieve 1, I don't think there is any point to 2.
    3. There was a thread discussing internal table memory consumption just today, with approaches for 6.20+ and 4.6-.  Heres the link: How to catch the Internal Table memory
    Cheers,
    Brad

  • Leave to list processing

    Hi all,
    i've designed a selection screen in module pool and based on some selction criteria i've to display success and error records.These records should be displayed in the form of list output.
    As i'm using module pool i've used LEAVE TO LIST-PROCESSING for displaying these records.As i've designed selection screen the application tool bars are appearing here on the list and no tool bar icon is functioning even though i've declared them in PF STATUS.
    Now when i double click on list it has to take me to some t-code say SM35.Where should i write this AT LINE-SELECTION event?
    ...Regards

    Hai,,
               You keep the AT-LINE SELECTION in the last only...
    For Leave To List Processing ,you will try the following ..
       IF SY-UCOMM = 'Your Fn_Code'.
           LEAVE SCREEN.
           LEAVE TO LIST-PROCESSING.
        SELECT * FROM ZTable INTO TABLE ITAB.
              LOOP AT ITAB.
          WRITE:/ ITAB-ITEMNO.
         ENDLOOP.   
      ENDIF.
    Try this ..it will be useful to you..I hope..
    reward points if it's useful..
    Regards,
    Manoj.

  • Return to List Processing From Business Object Method CTREQUEST.Display

    I have a simple program which displays selected TRKORR (Transport/Correction) numbers in a list on the screen. I want to be able to double click on the number and inspect the contents of these items. 
    The program is not pretty - its for my use only.
    Anyway, the code below is tucked at the end of my program, and it works fine - double clicking will display the request. .
    FORM SHOWCTS  USING  P_REQ.
      DATA : ThisReq      TYPE SWC_OBJECT.
      DATA : ReqObjectKey Like SWOTOBJID-OBJKEY .
      SWC_CONTAINER        REQCONTAINER.
      SWC_CREATE_CONTAINER REQCONTAINER.
      move p_req to ReqObjectKey .
      SWC_CREATE_OBJECT ThisReq 'CTREQUEST' ReqObjectKey .
      SWC_CALL_METHOD   ThisReq 'Display'   ReqContainer .
    ENDFORM.
    AT LINE-SELECTION .
      data l_req type TRKORR .
      move sy-lisel+29(20) to l_req . CONDENSE l_req NO-GAPS .
      perform showcts using l_req .
    The problem is, when I exit from the CT Request, the program EXITs  . The desired behavior would be to return to my list processing.
    How can I return to my list upon exiting the Request display?
    Thanks...
    ...Mike

    Hi,
    Try command LEAVE TO SCREEN 0 instead of EXIT.
    Thanks.
    Ravi

  • Problem facing in ALV to List processing and back to ALV

    HI all,
    In ALV USER_COMMAND i have inserted statement 'LEAVE TO LIST-PROCESSING'. I want to display records on List processor (Classical report) which are selected from ALV.
    Due to LEAVE TO LIST-PROCESSING i can see Classical report but from here i am not able to come back on ALV screen...even not on any screen because BACK button on GUI-Status is not working.
    From List Status i can see same GUI status which i gave to ALV.
    also i have tried giving LEAVE LIST PROCESSING but due to this though i get ALV back but i cant get List display.
    Please direct how to move.
    thanks,

    hello~ try this
    FORM alv_user_command  USING r_ucomm LIKE sy-ucomm
                                 rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN 'ELOG'.
          call screen 100.
      ENDCASE.
      rs_selfield-refresh = 'X'.
    ENDFORM.
    screen 100 just need PBO Module
    module LOG_DISPLAY output.
      SET PF-STATUS space.
      WRITE: / 'HELLO'.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      LEAVE SCREEN.
    endmodule.

  • Problem with leave to list-processing and return to screen

    Hi all,
    I am designing a screen in which I have provided a pushbutton which will allow the user to upload (via BDC) the price list to VK11 transaction. And consequently, after upload the BDC message will be captured and displayed as an ALV list. for this, I am using leave to list-processing and return to screen 100 statement.
    My problem is, when I return from the alv list screen by pressing back/any button the called screen 100 is displayed as a dialog window. but actually the screen 100 is a normal screen.
    How can I rectify this problem?
    Thanks,
    Rajan

    rajan,
    i think the below link will clear your problem.
    [http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9d2f35c111d1829f0000e829fbfe/frameset.htm]
    Regards,
    Venkat

  • Leave to list processing and retun to scren 100

    Once output is generated in the list i want back to main screen .
    How i will prceed
    regards
    jithen

    This will end up current calling sequence (will proceed after CALL SCREEN XXX statement). So if no other CALLs were found the program will be finished, or will go back in selection screen.
    LEAVE to LIST-PROCESSING and RETURN TO SCREEN 0. 
    This will go back to screen XXX, if main screen is 200.
    LEAVE to LIST-PROCESSING and RETURN TO SCREEN 200.  "when you choose BACK, screen 200 will be called (main screen)
    Regards
    Marcin

Maybe you are looking for