Issue found in EHS in using specification data import using  process

Dear EHS community
Now using EHS classic for a long time a issue has been detected in EHS standard import. During maintenance of EHS data normally using CG02 the system is always using the default "Data origin" specified in customizing to be stored in EHS tables (e.g. ESTRH, ESTRI etc.). In standard process to import specification data one can define a different "Data origin". Now we are using an import file with default" data origin and executed the import. Now a strange effect has been detected (and not always) for update of identifiers. For the import purpose you must nominate at least one identifier. If the identifier is found then normally no update happens but only the value assignment data is inserted (or updated). If the identifier is not found it get be inserted on spec level in ESTRI. Now during the update the "Data origin" of the identifier present in the system (and which matched to identifier on file level) was changed but not the identifier as such. Any data record on value assignment level received the defautl data origin. Actually there is no explanation for this behaviour. If Default "Data origin" would be "SAP" (as the term) this value has been change to "Space". Any explanation of this effect is appreciated (or and idea regarding that).
C.B.
PS: analysis of change logs in EHS etc. executed so far clearly indictae that an "Update" happened on the identifier; but only the field SRSID is effected; EHS import is quite old and therefore very stable;
PPS: I found a thread taking about the import file:
spec import_inheritance data
Example shown thre is like:
+BS
+BV   $ESTRH
SRSID                          EH&S
SUBID                          000000385000
SUBCAT                         REAL_SUB
AUTHGRP                        EHS_PS
+EV
+BV   $ESTRI
SRSID                          EH&S
IDTYPE                         NAM
IDCAT                          EHS_OLD
IDENT                          XY0002
ORD                            0001
+EV
+BV   SAP_EHS_1013_001
$ESTVA-SRSID                   EH&S
SAP_EHS_1013_001_VALUE         N09.00101280
+EV
If you compare SAP helpt normally only at the"begining pof the file you will find "SRSID" Here this field is nominated often. On Level of ESTRH as well as ESTRI.
PPS: e.g. refer to: TCG56 EHS: Data Origin - SAP Table - ABAP

Dear Ralph
first thanks for feedback. Regarding content provider: we need to check that on deeper level
Regarding import may be my explanation was not good enough.
Imagine this case:
you have a specification in the system there you would like to add e.g. denisity data.. To do so you need at least one identifier which you must nominate during the import. As long as this identifier is "identical" in system and in the file this identifier should not be "changed/effected" etc. and only the additional data should be loaded, This was the process we used. Now we detected that this seems not to be the real effect. The identifier as part of the file is "updated" in EH&S. In the example above somebody used this logic:
+BV   $ESTRI
SRSID                          EH&S
IDTYPE                         NAM
IDCAT                          EHS_OLD
IDENT                          XY0002
ORD                            0001
+EV
Nearly the same is used in our process. Only difference ist, that we do not define the "SRSID". The same is true for any other data in the file. SRSID is nether specified.
What is happing now:
e.g. the "density" data is added with SRSID "EH&S". This effect is "normal". As by default SRSID should be EH&S (as this is defined as such in customizing) and because of the fact that at the top the ID is es well "EH&S". In the system we have the "XY0002" having SRSID EH&S. By using now this upload approach the only difference afterwards is tht kin th systeM; XY0002 does get "blank" as SRSID (and there is no data origin "blank" defined. Up to today my unertsanding was clearly: no update should happen in the identifier. This seems not to be the case. Is my understanding here different? Or is this SRSID in the load file is really mandatory in ESTRI level to avoid this effect. I hope that you can provide some feedback regarding this.
C.B.
PS: referring to: Example: Transfer File for Specifications - Basic Data and Tools (EHS-BD) - SAP Library
The header of import file should look like:
Comment
+C
Administrative section
Character standard
+SC
ISO-R/3
Identification (database name)
+ID
IUCLID
Format version
+V
2.21
Export date
+D
19960304
Key date for export
+VD
19960304
Set languages for export
+SL
E
Date format
+DF
DD.MM.YYYY
IN our case +ID = EH&S (as this is the value in export file)
IN this example this additional one is shown:
Begin table
+BV
$ESTRI
  Table field
IDTYPE
NAM
  Table field
IDCAT
IUPAC
  Table field
IDENT
anisole
  Table field
LANGU
E
  Table field
OWNID
ID1
Therefore no SRSID is specified. And this is the data in our file (on high level) and the "only" change is that the identifer get "deleted" the SRSID

Similar Messages

  • Unreservation Issue while SO line split using Process Order API

    Hi,
    We are facing unreservation issue in the parent line after sales order line split for partially reserved line scenario usiing oe_order_pub.process_order API in 11.5.10 instance.
    Standard Proces:
    Orlder line - 10 quantities
    Partially Reserved with 5 Quantities
    Splitting the SO line using Process order API
    Parent line with 5 quantities - Reserved
    Child Line with 5 quantities - Unreserved
    Our Issue
    Orlder line - 10 quantities
    Partially Reserved with 5 Quantities
    Splitting the SO line using Process order API
    Parent line with 5 quantities - Unreserved
    We are not facing this issue when try to split the SO line from the Appllication.
    Please find the script below which we are using for this line split scenario. The same script was working fine in our instance and not working after applying patch for Minimum Baseline Patch Requirements for Extended Support on Oracle E-Business Suite 11.5.10 (Note 883202.1).
    I tried to find the differences between the APIs before and after patching and found these list of bug fixes in our API in the patched instances.
    1.7503298
    2.8339692
    3.8479339
    4.9347399
    Please help us in this issue.
    DECLARE
    p_header_id NUMBER :=836084;-- Sales order header id
    p_line_id NUMBER :=2560509;-- sales order line id
    p_item_id NUMBER :=405477;--item id in sales order line
    p_ord_qty NUMBER :=5;-- Total ordered quantity
    p_reserv_qty NUMBER :=2;--partially reserved quantity
    ln_counter NUMBER := 0;
    lv_return_status VARCHAR2 (1);
    lv_msg_data VARCHAR2 (2000);
    ln_msg_count NUMBER := 0;
    ln_increment NUMBER := 0;
    ln_inv_item_id NUMBER;
    ln_list_line_id NUMBER;
    ln_service_duration NUMBER := 0;
    lv_duration_uom VARCHAR2 (10);
    lv_duration_uom_desc VARCHAR2 (10);
    l_line_tbl oe_order_pub.line_tbl_type := oe_order_pub.g_miss_line_tbl;
    lr_header_rec oe_order_pub.header_rec_type;
    lr_header_val_rec oe_order_pub.header_val_rec_type;
    lt_header_adj_tbl oe_order_pub.header_adj_tbl_type;
    lt_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type;
    lt_header_price_att_tbl oe_order_pub.header_price_att_tbl_type;
    lt_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type;
    lt_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type;
    lt_header_scredit_tbl oe_order_pub.header_scredit_tbl_type;
    lt_header_scredit_val_tbl oe_order_pub.header_scredit_val_tbl_type;
    lt_line_tbl oe_order_pub.line_tbl_type;
    lt_line_val_tbl oe_order_pub.line_val_tbl_type;
    lt_line_adj_tbl oe_order_pub.line_adj_tbl_type;
    lt_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type;
    lt_line_price_att_tbl oe_order_pub.line_price_att_tbl_type;
    lt_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type;
    lt_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type;
    lt_line_scredit_tbl oe_order_pub.line_scredit_tbl_type;
    lt_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type;
    lt_lot_serial_tbl oe_order_pub.lot_serial_tbl_type;
    lt_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type;
    lt_action_request_tbl oe_order_pub.request_tbl_type;
    lv_errmsg VARCHAR2(4000);
    v_user_id NUMBER:=fnd_profile.value('USER_ID');
    v_resp_id NUMBER:=fnd_profile.value('RESP_ID');
    v_resp_appl_id NUMBER:=fnd_profile.value('RESP_APPL_ID');
    v_security_group_id NUMBER:=fnd_profile.value('SECURITY_GROUP_ID');
    v_server_id NUMBER:=fnd_profile.value('SERVER_ID');
    v_login_id NUMBER:=fnd_profile.value('LOGIN_ID');
    l_file_val Varchar2(200);
    BEGIN
    --- Apps Initialize
    fnd_global.apps_initialize(v_user_id,v_resp_id,v_resp_appl_id,v_security_group_id,v_server_id);
    l_line_tbl(1) := oe_order_pub.G_MISS_LINE_REC;
    l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
    l_line_tbl(1).split_action_code := 'SPLIT';
    l_line_tbl(1).header_id := p_header_id;
    l_line_tbl(1).line_id := p_line_id;
    l_line_tbl(1).ordered_quantity := p_reserv_qty ;
    l_line_tbl(2) := oe_order_pub.G_MISS_LINE_REC;
    l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
    l_line_tbl(2).header_id := p_header_id;
    l_line_tbl(2).split_from_line_id := p_line_id;
    l_line_tbl(2).inventory_item_id := p_item_id ;
    l_line_tbl(2).ordered_quantity := (p_ord_qty-p_reserv_qty) ;
    --Debug File creation
    oe_debug_pub.debug_on;
    oe_debug_pub.initialize;
    l_file_val := OE_DEBUG_PUB.Set_Debug_Mode('FILE'); -- add l_file_val Varchar2(200); in declare section
    oe_Debug_pub.setdebuglevel(5);
    dbms_output.put_line(' Log File : '||l_file_val);
    dbms_output.put_line('Log File name '||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE);
    -- Start Process Order API for Splitting the line
    oe_order_pub.process_order (p_api_version_number => 1.0,
    p_init_msg_list => fnd_api.g_true,
    p_return_values => fnd_api.g_false,
    p_action_commit => fnd_api.g_true,
    x_return_status => lv_return_status,
    x_msg_count => ln_msg_count,
    x_msg_data => lv_msg_data,
    p_line_tbl => l_line_tbl,
    x_header_rec => lr_header_rec,
    x_header_val_rec => lr_header_val_rec,
    x_header_adj_tbl => lt_header_adj_tbl,
    x_header_adj_val_tbl => lt_header_adj_val_tbl,
    x_header_price_att_tbl => lt_header_price_att_tbl,
    x_header_adj_att_tbl => lt_header_adj_att_tbl,
    x_header_adj_assoc_tbl => lt_header_adj_assoc_tbl,
    x_header_scredit_tbl => lt_header_scredit_tbl,
    x_header_scredit_val_tbl => lt_header_scredit_val_tbl,
    x_line_tbl => lt_line_tbl,
    x_line_val_tbl => lt_line_val_tbl,
    x_line_adj_tbl => lt_line_adj_tbl,
    x_line_adj_val_tbl => lt_line_adj_val_tbl,
    x_line_price_att_tbl => lt_line_price_att_tbl,
    x_line_adj_att_tbl => lt_line_adj_att_tbl,
    x_line_adj_assoc_tbl => lt_line_adj_assoc_tbl,
    x_line_scredit_tbl => lt_line_scredit_tbl,
    x_line_scredit_val_tbl => lt_line_scredit_val_tbl,
    x_lot_serial_tbl => lt_lot_serial_tbl,
    x_lot_serial_val_tbl => lt_lot_serial_val_tbl,
    x_action_request_tbl => lt_action_request_tbl
    IF lv_return_status = fnd_api.g_ret_sts_success
    THEN
    COMMIT;
    DBMS_OUTPUT.put_line('SUCCESS');
    ELSE
    IF ln_msg_count > 0
    THEN
    FOR i IN 1 .. ln_msg_count
    LOOP
    --fnd_file.put_line (fnd_file.log,  fnd_msg_pub.get (i, 'F') );
    DBMS_OUTPUT.put_line('ERROR'||fnd_msg_pub.get (i, 'F'));
    END LOOP;
    END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('EXCEPTION'||' '||SQLERRM);
    END;
    Thanks,
    Kavin
    Edited by: 897922 on Nov 17, 2011 11:51 PM

    Suggest that you first enter the transaction manually via the order entry form and adjustments. Then query the oe_price_adustments table and determine the values you need to send in to get the results you want.
    -Bob

  • When to use specific data structures

    Hi
    I'm currently learning Java and have found a wealth of information on data structures (link lists,queues et. al.) but I'm finding not much material on when best to apply specific data structures and the advantages and disadvantages. Could anyone point me to any resources?
    Second question as a Java developer do you actually use things like linked lists etc regularly?
    Thanks in advance

    I suppose that a wealth of information exists because data structures are an integral part of programming. In simpler terms, all that information exists because the answer to question two is yes, absolutley.
    The answer to question one is a bit trickier. It's kind of like asking when is best to use a flathead vrs. a phillips screwdriver. The answer seems obvious within a given context, but obscure outside of one.
    IMHO: The 'when' becomes clear with experience. Focus on the 'how' and you'll be ready when you are faced with a problem that calls for a particular type of solution.
    jch

  • Set restriction to get messages older than a specific date using EWS?

    Hi, I'm new working with EWS and I have found some code to set a restriction to help me filter messages "between" to dates, but I need to be able to obtain emails that are "older" than a specific date so I can delete them.  My application needs to be
    able to clean up a mailbox to only to keep up to so many days/weeks worth of emails.  The code I have to search for emails that works
    between dates is:
    public void SetDateRestriction(FindItemType findItemRequest)
    DateTime dateStart = DateTime.Now;
    DateTime dateEnd = DateTime.Today.AddDays(-180);
    PathToUnindexedFieldType dateSentPath = new PathToUnindexedFieldType();
    dateSentPath.FieldURI = UnindexedFieldURIType.itemDateTimeSent;
    IsGreaterThanOrEqualToType isGreaterThanOrEqual = new IsGreaterThanOrEqualToType();
    isGreaterThanOrEqual.Item = dateSentPath;
    FieldURIOrConstantType dateConstant = new FieldURIOrConstantType();
    ConstantValueType dateConstantValue = new ConstantValueType();
    //dateConstantValue.Value = string.Format("{0}-{1}-{2}T00:00:00Z", dateStart.Year.ToString(), dateStart.Month.ToString(), dateStart.Day.ToString());
    dateConstantValue.Value = dateStart.ToUniversalTime().ToString("yyyy-MM-ddT00:00:00Z");
    dateConstant.Item = dateConstantValue;
    isGreaterThanOrEqual.FieldURIOrConstant = dateConstant;
    // less than or equal to
    PathToUnindexedFieldType dateSentPath1 = new PathToUnindexedFieldType();
    dateSentPath1.FieldURI = UnindexedFieldURIType.itemDateTimeSent;
    IsLessThanOrEqualToType lessThanOrEqualTo = new IsLessThanOrEqualToType();
    lessThanOrEqualTo.Item = dateSentPath1;
    FieldURIOrConstantType dateConstant1 = new FieldURIOrConstantType();
    ConstantValueType dateConstantValue1 = new ConstantValueType();
    //dateConstantValue1.Value = string.Format("{0}-{1}-{2}T00:00:00Z", dateEnd.Year.ToString(), dateEnd.Month.ToString(), dateEnd.Day.ToString());
    dateConstantValue1.Value = dateEnd.ToUniversalTime().ToString("yyyy-MM-ddT00:00:00Z");
    dateConstant1.Item = dateConstantValue1;
    lessThanOrEqualTo.FieldURIOrConstant = dateConstant1;
    RestrictionType restriction = new RestrictionType();
    AndType andType = new AndType();
    andType.Items = new SearchExpressionType[] { lessThanOrEqualTo , isGreaterThanOrEqual };
    restriction.Item = andType;
    findItemRequest.Restriction = restriction;
    How can I modify this to give me emails older than a specific date?  Also any input on doing the deleting would also be greatly appreciated!
    Best Regards,
    Nelson

    Thank you very much Glen!  I can't believe it was that easy.  Works perfect.  I will work on the DeleteItemType.  I was also wondering if there was a way to detect if an email is an Out-of-Office (OOO) or Undeliverable message? 
    My app goes through all the emails and I need to skip any that are OOO or Undeliverable messages.  I've learned how to use the SearchFilter and I find that easier and more straight forward than setting the restrictions.  I'm also able to use a SearchFilter
    to get emails older than the specified date. 
    Here's my new code for reading unread emails using the SearchFilter and paging (for better efficiency). 
    1 - Is there anyway to tell the filter to get AllProperties without having to specify each one using ItemSchema or EmailMessageSchema?
    2- What is the difference between those two (any advantages over one or the other)?
    3 -Is there any reason to even be using the ExchangeServiceBinding here anymore since it seems the ExchangeService object is all I need?  In my old code, I was using the ExchangeService object to do an AutoDiscover and then using that to set the URL
    in the ExchangeServiceBinding.  What are the main to difference/uses for these to objects?  Sorry if that's a dumb question.
    private void GetUnReadEmails(string sMailboxName)
    // Create the binding to Exchange
    ExchangeServiceBinding esb = new ExchangeServiceBinding();
    esb.RequestServerVersionValue = new RequestServerVersion();
    //Console.WriteLine("Exchange version: " + esb.RequestServerVersionValue.Version);
    //esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;
    ExchangeService service = GetBinding(sMailboxName);
    Console.WriteLine("Exchange version: " + service.RequestedServerVersion);
    esb.Url = service.Url.ToString();
    esb.Credentials = new NetworkCredential(Username, Password, Domain);
    Mailbox mb = new Mailbox(sMailboxName);
    FolderId fid1 = new FolderId(WellKnownFolderName.Inbox, mb); // where fid1 was WellKnownFolderName.Inbox
    //FindFoldersResults findResults = service.FindFolders(fid1, new FolderView(int.MaxValue));
    ItemView iv = new ItemView(50, 0);
    FindItemsResults<Item> findResults = null;
    PropertySet ivPropSet = new PropertySet(BasePropertySet.IdOnly);
    //SearchFilter ivSearchFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.And, new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false), new SearchFilter.ContainsSubString(ItemSchema.Subject,"MSGID:"));
    SearchFilter searchFilter = new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false);
    iv.PropertySet = ivPropSet;
    do
    findResults = service.FindItems(fid1, searchFilter, iv);
    string sText = "";
    if(findResults.Items.Count > 0)
    //PropertySet itItemPropSet = new PropertySet(BasePropertySet.IdOnly) { EmailMessageSchema.Body };
    PropertySet itemPropSet = new PropertySet(BasePropertySet.IdOnly) {ItemSchema.Subject, ItemSchema.Body, ItemSchema.DateTimeReceived, ItemSchema.HasAttachments, ItemSchema.ItemClass};
    itemPropSet.RequestedBodyType = BodyType.Text;
    service.LoadPropertiesForItems(findResults.Items, itemPropSet);
    //service.LoadPropertiesForItems(findResults.Items, itItemPropSet);
    //service.LoadPropertiesForItems(findResults, new PropertySet(ItemSchema.Subject, ItemSchema.Body, ItemSchema.DateTimeReceived));
    Console.WriteLine("Total items: " + findResults.TotalCount);
    foreach (Item item in findResults.Items)
    Console.WriteLine("ItemID: " + item.Id.UniqueId);
    Console.WriteLine("Subject: " + item.Subject);
    Console.WriteLine("Received date: " + item.DateTimeReceived);
    Console.WriteLine("Body: " + item.Body);
    Console.WriteLine("Has attachments: " + item.HasAttachments);
    //Mark the email as read
    EmailMessage emEmail = EmailMessage.Bind(service, item.Id);
    //emEmail.Load();
    emEmail.IsRead = true;
    emEmail.Update(ConflictResolutionMode.AlwaysOverwrite);
    sText += "Subject: " + (item.Subject.Trim()) + " ";
    //sText += "DisplayTo: " + (item.DisplayTo.Trim()) + " ";
    sText += "DateTimeReceived: " + (item.DateTimeReceived.ToString()) + " ";
    sText += "ItemClass: " + (item.ItemClass.Trim()) + " ";
    sText += "\r\n";
    else
    sText = "No unread emails";
    Console.WriteLine("No unread emails");
    txtItems.Text = sText;
    iv.Offset += findResults.Items.Count;
    } while (findResults.MoreAvailable == true);
    Thanks again for your time.  I appreciate it.
    Nelson

  • How can I use Automator to extract specific Data from a text file?

    I have several hundred text files that contain a bunch of information. I only need six values from each file and ideally I need them as columns in an excel file.
    How can I use Automator to extract specific Data from the text files and either create a new text file or excel file with the info? I have looked all over but can't find a solution. If anyone could please help I would be eternally grateful!!! If there is another, better solution than automator, please let me know!
    Example of File Contents:
    Link Time =
    DD/MMM/YYYY
    Random
    Text
    161 179
    bytes of CODE    memory (+                68 range fill )
    16 789
    bytes of DATA    memory (+    59 absolute )
    1 875
    bytes of XDATA   memory (+ 1 855 absolute )
    90 783
    bytes of FARCODE memory
    What I would like to have as a final file:
    EXCEL COLUMN1
    Column 2
    Column3
    Column4
    Column5
    Column6
    MM/DD/YYYY
    filename1
    161179
    16789
    1875
    90783
    MM/DD/YYYY
    filename2
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    MM/DD/YYYY
    filename3
    xxxxxx
    xxxxx
    xxxx
    xxxxx
    Is this possible? I can't imagine having to go through each and every file one by one. Please help!!!

    Hello
    You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
    set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
    if f ends with "/" then set f to f's text 1 thru -2
    do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
    use strict;
    use open IN => ':crlf';
    chdir $ARGV[0] or die qq($!);
    local $/ = qq(\\0);
    my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
    local $/ = qq(\\n);
    #     CSV spec
    #     - record separator is CRLF
    #     - field separator is comma
    #     - every field is quoted
    #     - text encoding is UTF-8
    local $\\ = qq(\\015\\012);    # CRLF
    local $, = qq(,);            # COMMA
    # print column header row
    my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
    print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    # print data row per each file
    while (@ff) {
        my $f = shift @ff;    # file path
        if ( ! open(IN, '<', $f) ) {
            warn qq(Failed to open $f: $!);
            next;
        $f =~ s%^.*/%%og;    # file name
        @dd = ('', $f, '', '', '', '');
        while (<IN>) {
            chomp;
            $dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
            ($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
            ($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
            ($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
            ($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
            last unless grep { /^$/ } @dd;
        close IN;
        print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
    EOF
    Hope this may help,
    H

  • HT1933 I bought six songs using my itunes gift card in February but I cannot play the songs or downlaod them to my ipod because I get an error saying the original file could not be found.  I have used the gift card previously with no issue.  How do I fix

    I bought six songs using my itunes gift card in February but I cannot play the songs or downlaod them to my ipod because I get an error saying the original file could not be found.  I have used the gift card previously with no issue.  How do I fix it?

    Have you moved or deleted those tracks on your computer (the gift card has got nothing to do with it) ?
    You might be able to re-download them via the Purchased link under Quick Links on the right-hand side of the iTunes store home page on your computer's iTunes (re-downloading isn't possible in all countries) - if those songs appear there then delete the entries from your iTunes library (where you are clicking on them to play them and gettinf the 'original file' error), and they should then get a cloud symbol against them for re-downloading.
    If they don't appear in that link then have you got them on, for example, an external drive ?

  • Using Time Machine, is it possible to back up a computer AFTER a specific date. I only want to back up files from AFTER January 2015. Is this possible, and how can I do this?

    Using Time Machine, is it possible to back up a computer AFTER a specific date. I only want to back up files from AFTER January 2015. Is this possible, and how can I do this?

    emilypdunne wrote:
    Using Time Machine, is it possible to back up a computer AFTER a specific date. I only want to back up files from AFTER January 2015. Is this possible, and how can I do this?
    Is what you're saying that you only want backups in TM of the state of your Mac from January 2015 to the current date and nothing before then? I'd think the simplest solution would just be to delete in TM all the backups prior to 1/15 and then let TM do its thing. The ultimate source for all things Time Machine is here. On this page, note the comment that "Time Machine will never delete the backup copy of anything that was on the disk being backed-up at the time of any remaining backup" which I understand to mean that if you delete all the backups in the TM file prior to 1/15, any file that wasn't present on your Mac as of 1/15 will no longer be represented in the TM file. Note that the second link also has instructions for how to delete TM files.
    If you were trying to accomplish something else, then as Emily Litella (Gilda Radner in SNL) used to say, "never mind."

  • Odbc Driver error when using specific date column

    I am receiving the this error:
    Odbc driver returned an error (SQLExecDirectW).
    Error DetailsError Codes: OPR4ONWY:U9IM8TAC:OI2DL65P State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46036] Internal Assertion: Condition len <= desc->objectLength_, file ..\Oci8\Src\SQXDGOci8.cpp, line 614. (HY000)
    It happens when I try to to set criteria on a specific date column or I do not set criteria at all. If I set date column 1 to greater than 4 or so months back the report returns, along with all the dates from date column 2. But if I then try to set date column 2 as the criteria, no matter if I just ask for data from a week until today, I receive this error. I tried changing the Server Stack size to 512, but that did not help. Anyone have an idea on this???

    You seem to be using an ODBC connection with an Oracle database, is that correct? If so you should install the Oracle client and use the OCI driver instead and it is much faster and stable than ODBC.

  • Enforcing integrity using oracle specific data base commands .v. using fron

    Full subject : Enforcing integrity using oracle specific data base commands .v. using front end.
    It ought to be generally accepted that it is better to enforce integrity directly in the data base using constraints, dependencies, triggers etc rather than leaving it to specific front end programmes.
    In my view, the chief advantages - of enforcing integrity directly in the data base - are:
    (1) No process can violate the integrity.
    (2) Being server centric, these commands run on the server and so can be easily sized in one place.
    (3) One time data migration (imports) into the system using Oracle tools or SQL commands would also need to conform to the integrity constraints. Thus an implementor would be assured that the basic data is alright.
    I am faced with a situation where we are about to implement a new Oracle based package. During data migration, when we discovered that there are no integrity constraints built into the target data base, the package vendor asserted that it is not necessary to build in integrity into the database. This seems to be an extreme and risky view.
    Further, it is argued by the package vendor that putting constraints directly in the data base would significantly increase the needed resources (RAM) on the server. In my view, this increase is trivial and anyway, hardware costs are crashing day by day.
    In the absence of integrity checks in the data base, it seems to me that every program would have to extra zero value work to ensure integrity of the end user data. It will still never be complete.
    I would like to know the pros and cons of implementing without integrity constraints.
    OK.

    AnanthaP wrote:
    Full subject : Enforcing integrity using oracle specific data base commands .v. using front end.
    It ought to be generally accepted that it is better to enforce integrity directly in the data base using constraints, dependencies, triggers etc rather than leaving it to specific front end programmes.
    In my view, the chief advantages - of enforcing integrity directly in the data base - are:
    (1) No process can violate the integrity.
    (2) Being server centric, these commands run on the server and so can be easily sized in one place.
    (3) One time data migration (imports) into the system using Oracle tools or SQL commands would also need to conform to the integrity constraints. Thus an implementor would be assured that the basic data is alright.
    I am faced with a situation where we are about to implement a new Oracle based package. During data migration, when we discovered that there are no integrity constraints built into the target data base, the package vendor asserted that it is not necessary to build in integrity into the database. This seems to be an extreme and risky view.
    Further, it is argued by the package vendor that putting constraints directly in the data base would significantly increase the needed resources (RAM) on the server. In my view, this increase is trivial and anyway, hardware costs are crashing day by day.
    In the absence of integrity checks in the data base, it seems to me that every program would have to extra zero value work to ensure integrity of the end user data. It will still never be complete.
    I would like to know the pros and cons of implementing without integrity constraints.
    OK.It's a shame you seem to be so far into the process and committed to this vendor. I once had a vendor tell us his product would run on Oracle but they recommended MS SQL Server because "oracle can't handle more than 5 concurrent sessions." I made sure that vendor didn't make the short list.

  • Find the used space in datafile on any specific date

    Hi,
    We have a datafile created on 2-11-2009.
    I wish to find the used space in that datafile on 13-12-2009.
    From v$datafile and dba_data_files from the "BYTES" column it wld give me the current used space in the datafile.
    But how to find the used space in datafile on any specific date.
    Thanks.

    Hello,
    It depends on your Oracle release, starting with Oracle 10.1, you have the View dba_hist_tpspc_space_usage which may give you an history of the space used by the Tablespaces:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_3195.htm#I1023456
    You may have to pay for specific license to be allowed to access to this View which belongs to AWR (Automatic Workload Repository).
    Hope this help.
    Best regards,
    Jean-Valentin

  • Issue with displaying QM control chart for specific date range

    Dear All
    In our chemical mfg organisation, we just implemented SAP QM solution and things are working fine. I have implemented control  chart functionalities as below:
    SPC Criteria in Inspection Plan: Task List Charateristics / Material (0020)
    Sampling Procedure: Fixed Sample / SPC Inspection (without inspection point)
    We use process orders to get the inspection lots for products (material) and record results for the MICs and UD the inspection lots.
    Currently all our Control Chart have status 1 (created) and we have not moved any of those charts to status 3 and 5 yet.
    Using QGC1 when user trying to run control chart for any particular material in the plant and for a specific date range, report showing all the charts for that material with different MICs as expected. Though the result is NOT restricted to the selection dates either against "Lot Created On" or " Insp. Start Date" ( may be due to SPC criteria????) , its always showing all the result for any particular MIC for that material starting from go live till today.
    How to restrict the dispaly of result on the chart for any particular MIC against the Material / Plant within a specific date range ?
    Looking forward for your response.
    Best Regards
    SK

    Hi,
    1. Even though when i give the Created on, and to date the system is displaying the report which is prior to the created on date.
    2. Similarly the report data is different when the field is maximum no of Hits is given. for example when i giving this field as 10, 20, 30, etc the report is showing only 10 line items. if i enter 50, 60 etc it is showing the list for half i given.
    Note that system is having more than 1000 line items to display..
    Regards,
    R. Loganathan

  • Use journaling to restore to specific date?

    Is there any way to use journaling to restore the system to a specific date?
    thanks, howard

    Hello Howard.
    None that I'm aware of.
    See Mac OS X: About file system journaling for information.

  • Strange issue with rights of account, used by SSIS (Foreach Loop Container does not return file names without Admin rights on server)

    Hello everyone.
    Faced very strange issue with account, which is used to run SSIS package.
    The specific package uses Foreach Loop Container to retrieve file names within the specified folder, and put them into Import file task.
    The package is set up to run under specific service account. This service account is given all permissions (Full control) to the folder where source files reside.
    So the issue is: SSIS package fails to execute this task (Foreach Loop Container and then Import), and shows that no files are found in the directory (although files ARE there).
    Once we're adding the service account into local Administrators group on the SQL Server, it works! Removing - does not work again. We cannot leave the service account as SQL server's admin as it's prohibited by our IT policies, and is just a bad practice.
    Any ideas, please? 
    MCP

    Here's the real log output:
    Date 16.04.2014 12:47:09
    Log Job History (RU-BW: Update)
    Step ID 1
    Server Server
    Job Name RU-BW: Update
    Step Name bw_import_cust_master_data
    Duration 00:00:02
    Sql Severity 0
    Sql Message ID 0
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted 0
    Message
    Executed as user: service_account Microsoft (R) SQL Server Execute Package Utility  Version 10.50.4286.0 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  12:47:09  Error: 2014-04-16 12:47:11.45
        Code: 0xC0202070     Source: bw_import_cust_master_data Connection manager "Input"     Description: The file name property is not valid. The file name is a device or contains invalid characters.  End Error  Error:
    2014-04-16 12:47:11.47     Code: 0xC0202070     Source: bw_import_cust_master_data Connection manager "Input"     Description: The file name property is not valid. The file name is a device or contains invalid characters.  End
    Error  Error: 2014-04-16 12:47:11.48     Code: 0xC0202070     Source: bw_import_cust_master_data Connection manager "Input"     Description: The file name property is not valid. The file name is a device or contains invalid
    characters.  End Error  Error: 2014-04-16 12:47:11.48     Code: 0xC020207E     Source: Import file Flat File Source [1]     Description: The file name is not valid. The file name is a device or contains invalid characters.
     End Error  Error: 2014-04-16 12:47:11.48     Code: 0xC004701A     Source: Import file SSIS.Pipeline     Description: component "Flat File Source" (1) failed the pre-execute phase and returned error code 0xC020207E.
     End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  12:47:09  Finished: 12:47:11  Elapsed:  2.324 seconds.  The package execution failed.  The step failed.
    MCP

  • Issue with Ftp Client / Server using Sockets

    I have developed a Ftp Client and a Ftp Server. The client Connects to the Ftp Server and sends files to the ftp server. It is a multi threaded server and can have multiple clients connecting to it.
    If a client goes down...the server waits till the client comes up
    Similarly the client waits if a server goes down and reconnects when the server is again up and running
    i am having a strange issue here. When two clients go down and reconnect to the server...They take a long time to connect and transferring of files takes a long time...
    Other wise in all other scenarios the duo work properly.
    Any feedback and suggestion about this strange issue from all you java gurus out there will be deeply appreciated.
    Here is the client code
    import java.net.*;
    import java.net.Socket;
    import java.net.InetAddress;
    import java.io.*;
    import java.io.File;
    import java.util.*;
    import java.lang.*;
    import java.lang.Object;
    import javax.crypto.*;
    import java.util.regex.*;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    import java.security.spec.AlgorithmParameterSpec;
    import java.security.spec.KeySpec;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.io.File.*;
    import java.nio.channels.FileLock;
    public class  FTPClient {
         public static void main(String[] args) throws Exception
              Timer timer = new Timer("Test Timer");
              timer.scheduleAtFixedRate(new TimerTask()
                   private int counter = 0;
                                            public void run() {
                                                                     try     {                                                                                
                                                                              System.out.println(counter++);
                                                                               Socket soc=new Socket("xxx.x.x.xx",5217);
                                                                               System.out.println("Socket Initialised.");          
                                                                               transferfileClient t=new transferfileClient(soc);
                                                                               t.SendFile();
                                                                               System.out.println("run complete.");                                                                           
                                                                          catch(Exception ex)
                                                           }, 10000, 40000);
         static class transferfileClient
         Socket ClientSoc;
         DataInputStream din;
         DataOutputStream dout;
         BufferedReader br;
         transferfileClient(Socket soc)
              try
                   ClientSoc=soc;
                   din=new DataInputStream(ClientSoc.getInputStream());
                   dout=new DataOutputStream(ClientSoc.getOutputStream());
                   br=new BufferedReader(new InputStreamReader(System.in));
              catch(Exception ex)
         //encrypto routine starts
    class DesEncrypter {
           Cipher ecipher;
            Cipher dcipher;   
            // 8-byte Salt
            byte[] salt = {
                (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
                (byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03
            // Iteration count
            int iterationCount = 19;   
            DesEncrypter(String passPhrase) {
                try {
                             // Create the key
                             KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
                             SecretKey key = SecretKeyFactory.getInstance(
                             "PBEWithMD5AndDES").generateSecret(keySpec);
                             ecipher = Cipher.getInstance(key.getAlgorithm());
                             dcipher = Cipher.getInstance(key.getAlgorithm());   
                             // Prepare the parameter to the ciphers
                             AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);   
                             // Create the ciphers
                             ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                             dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
                } catch (java.security.InvalidAlgorithmParameterException e) {
                } catch (java.security.spec.InvalidKeySpecException e) {
                } catch (javax.crypto.NoSuchPaddingException e) {
                } catch (java.security.NoSuchAlgorithmException e) {
                } catch (java.security.InvalidKeyException e) {
            // Buffer used to transport the bytes from one stream to another
            byte[] buf = new byte[1024];   
            public void encrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes written to out will be encrypted
                    out = new CipherOutputStream(out, ecipher);   
                    // Read in the cleartext bytes and write to out to encrypt
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
            public void decrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes read from in will be decrypted
                    in = new CipherInputStream(in, dcipher);   
                    // Read in the decrypted bytes and write the cleartext to out
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
    }     //encryptor routine ends     
         void SendFile() throws Exception
                   try
                   String directoryName; 
                   // File object referring to the directory.
                   String[] files;        // Array of file names in the directory.        
                   //directory = new File ( "C:\\FTP\\" ) ; 
                   File directory1 = new File("C:\\FTP");
                        boolean successmk = directory1.mkdir();
                        if (!successmk) {
                             // Directory creation failed /Already Exists
                        File directory = new File("C:\\FTP\\ftpc");
                        boolean successmk1 = directory.mkdir();
                        if (!successmk1) {
                             // Directory creation failed /Already Exists
                   //directory = new File ( "E:\\FTP-encrypted" ) ;           
                if (directory.isDirectory() == false) {
                    if (directory.exists() == false)
                       System.out.println("There is no such directory!");
                    else
                      System.out.println("That file is not a directory.");
                else {
                    files = directory.list();
                    System.out.println("Files in directory \"" + directory + "\":");
                    for (int i = 0; i < files.length; i++)
                             String patternStr = "xml";
                             Pattern pattern = Pattern.compile(patternStr);
                             Matcher matcher = pattern.matcher(files);
                             boolean matchFound = matcher.find();
                                       if (matchFound) {                                   
                                       System.out.println(" " + files[i]);                                        
                                       String filename;
                                       filename=files[i];                                   
                                       File f=new File(directory,filename);
                                       FileLock lock = null;                                   
                                       FileOutputStream fos = new FileOutputStream(f, true);
                                       lock = fos.getChannel().tryLock();
                                                 if (lock == null) {
                                                 System.out.println(" Failed to get the file lock: means that the file is locked by other instance.");
                                                 fos.close();
                                                 else
                                                                     InetAddress addr = InetAddress.getLocalHost();                                                                      
                                                                               // Get IP Address
                                                                               //byte[] ipAddr = addr.getAddress();
                                                                               String ip= addr.toString();                                                                      
                                                                               // Get hostname
                                                                               //String hostname = addr.getHostName();
                                       System.out.println(" Lock Acquired.");
                                       lock.release();
                                       fos.close();
                                       dout.writeUTF("SEND");
                                            dout.writeUTF(ip);
                                       dout.writeUTF(filename);
              //String msgFromServer=din.readUTF();          
    DesEncrypter encrypter = new DesEncrypter("My Pass Phrase!");
    // Encrypt
              FileInputStream fino=new FileInputStream(f);
              encrypter.encrypt(fino,
    new FileOutputStream("ciphertext.txt"));               
              fino.close();
              FileInputStream fin=new FileInputStream("ciphertext.txt");          
              int ch;
              do
                   ch=fin.read();
                   dout.writeUTF(String.valueOf(ch));
              while(ch!=-1);
              fin.close();          
              String option;
                        option=din.readUTF();
                             if((option.compareTo("Delete")==0))     
                                  boolean success = (new File("ciphertext.txt")).delete();
                                  boolean success1 = f.delete();
                                  if (success) {
                                  System.out.println("File Sent ...");
                                  if (success1) {
                                  System.out.println("--File deleted from Client ...");
         for (int j = 0; j < 999999999; j++){}
                                       }//pattermatch loop ends here
    else
                             { //System.out.println("   " + "Not an XML file-------->" +files[i]);
    for (int jb = 0; jb < 111999999; jb++){}
              }// for loop ends here for files in directory
                   }//else loop ends for directory files listing               
         System.out.println("sendfile finished...");
         return;
         }               catch(Exception ex)          {ex.printStackTrace();}                    
         }//sendfile ends here     
         public void displayMenu() throws Exception
                   System.out.println(" Send File");                    
                        SendFile();
                        return;          
    And here is the server code...
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.Date;
    import java.text.SimpleDateFormat;
    import java.text.DateFormat;
    import java.text.Format;
    import java.lang.Object;
    import java.lang.*;
    import javax.crypto.*;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    import java.security.spec.AlgorithmParameterSpec;
    import java.security.spec.KeySpec;
    public class FTPServer
    {     public static void main(String args[]) throws Exception
         {     ServerSocket soc=new ServerSocket(5217);
              System.out.println("FTP Server Started on Port Number 5217");
              while(true)
                   System.out.println("Waiting for Connection ...");
                   transferfile t=new transferfile(soc.accept());               
    class transferfile extends Thread
         Socket ClientSoc;
         DataInputStream din;
         DataOutputStream dout;     
         transferfile(Socket soc)
         {     try
              {     ClientSoc=soc;                              
                   din=new DataInputStream(ClientSoc.getInputStream());
                   dout=new DataOutputStream(ClientSoc.getOutputStream());
                   System.out.println("FTP Client Connected ...");
                   System.out.println("External IP of Client ..." + ClientSoc.getInetAddress());
                   //System.out.println("FTP Client Connected ..." + ClientSoc.getRemoteSocketAddress());
                   start();               
              catch(Exception ex)
    //encrypto routine starts
    class DesEncrypter {
            Cipher ecipher;
            Cipher dcipher;   
            // 8-byte Salt
            byte[] salt = {
                (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
                (byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03 };   
            // Iteration count
            int iterationCount = 19;   
           DesEncrypter(String passPhrase) {
                try {
                    // Create the key
                    KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
                    SecretKey key = SecretKeyFactory.getInstance(
                        "PBEWithMD5AndDES").generateSecret(keySpec);
                    ecipher = Cipher.getInstance(key.getAlgorithm());
                    dcipher = Cipher.getInstance(key.getAlgorithm());   
                    // Prepare the parameter to the ciphers
                    AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);   
                    // Create the ciphers
                    ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                    dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
                } catch (java.security.InvalidAlgorithmParameterException e) {
                } catch (java.security.spec.InvalidKeySpecException e) {
                } catch (javax.crypto.NoSuchPaddingException e) {
                } catch (java.security.NoSuchAlgorithmException e) {
                } catch (java.security.InvalidKeyException e) {
            // Buffer used to transport the bytes from one stream to another
            byte[] buf = new byte[1024];   
            public void encrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes written to out will be encrypted
                    out = new CipherOutputStream(out, ecipher);   
                    // Read in the cleartext bytes and write to out to encrypt
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
            public void decrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes read from in will be decrypted
                    in = new CipherInputStream(in, dcipher);   
                    // Read in the decrypted bytes and write the cleartext to out
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                        //added later on
                        in.close();                    
                    out.close();
                } catch (java.io.IOException e) {
    }     //encryptor routine ends
    //not implemented right now as we arent using the ftp server to download stuff...can be activated later on if we want
         void SendFile() throws Exception
              String filename=din.readUTF();
              File f=new File(filename);
              if(!f.exists())
                   dout.writeUTF("File Not Found");
                   return;
              else
              {     dout.writeUTF("READY");
                   FileInputStream fin=new FileInputStream(f);
                   int ch;
                   do
                        ch=fin.read();
                        dout.writeUTF(String.valueOf(ch));
                   while(ch!=-1);     
                   fin.close();     
                   dout.writeUTF("File Received Successfully");                                   
         String Compare(String filename) throws Exception
                        ///dout.writeUTF("entering compare");
                        String dateTempString=new String();
                        Date dateValue=new Date();
                        SimpleDateFormat formatter = new SimpleDateFormat ("hhmmss");
                        dateTempString = formatter.format(dateValue);
                        File dir1 = new File("C:\\FTPnew");
                        boolean success2 = dir1.mkdir();
                        if (!success2) {
                             // Directory creation failed /Already Exists
                        File dir = new File("C:\\FTPnew\\server");
                        boolean success = dir.mkdir();
                        if (!success) {
                             // Directory creation failed /Already Exists
                        File ftemp=new File(dir,dateTempString + filename);
                        File fnewtemp=new File(dir,"new-enc-"+filename);
                        // Create encrypter/decrypter class
                        DesEncrypter encrypter = new DesEncrypter("My Pass Phrase!");
                        FileOutputStream fout=new FileOutputStream(fnewtemp);     
                        int ch;
                        String temp;
                        do
                        {     temp=din.readUTF();
                             ch=Integer.parseInt(temp);
                             if(ch!=-1)
                                  fout.write(ch);                         
                        }while(ch!=-1);
                        fout.close();
                        //dout.writeUTF("written temp en file");
                        // Decrypt
                    encrypter.decrypt(new FileInputStream(fnewtemp),
                    new FileOutputStream(ftemp));
                        //String Option;
                        dout.writeUTF("Delete");                    
                        System.out.println("File Upload Successfull--Duplicate file with timestamp Created");          
                        boolean success1 = fnewtemp.delete();                    
                        return "hello" ;
         void ReceiveFile() throws Exception
              String ip=din.readUTF();
              System.out.println("\tRequest Coming from Internal IP Address : "+ ip);
              String filename=din.readUTF();
              if(filename.compareTo("File not found")==0)
                   return;
              // Destination directory
       File dir11 = new File("C:\\FTPnew");
                        boolean success22 = dir11.mkdir();
                        if (!success22) {
                             // Directory creation failed /Already Exists
                        File dir = new File("C:\\FTPnew\\server");
                        boolean success21 = dir.mkdir();
                        if (!success21) {
                             // Directory creation failed /Already Exists
              File f=new File(dir ,"enc-"+filename);
              File fe=new File(dir,filename);
              String option;
              if(fe.exists())
                   //dout.writeUTF("File Already Exists");
                   String compvalue = Compare(filename);
                   //dout.writeUTF(compvalue);
                   if(compvalue.compareTo("hello")==0)
                        //dout.writeUTF("Transfer Completed");
                        return;
                   option=din.readUTF();
              else
                   //dout.writeUTF("SendFile");
                    option="Y";
                   if(option.compareTo("Y")==0)
                        // Generate a temporary key.       
            // Create encrypter/decrypter class
             DesEncrypter encrypter = new DesEncrypter("My Pass Phrase!");
                 FileOutputStream fout=new FileOutputStream(f);                    
                        int ch;
                        String temp;
                        do
                        {     temp=din.readUTF();
                             ch=Integer.parseInt(temp);
                             if(ch!=-1)
                                  fout.write(ch);                         
                        }while(ch!=-1);
                        fout.close();                    
                        // Decrypt
                    encrypter.decrypt(new FileInputStream(f),
                    new FileOutputStream(fe));          
                        boolean success2 = f.delete();
                        dout.writeUTF("Delete");
                        System.out.println("File Upload Successfull");                    
                   else
                        return;
         public void run()
              while(true)
                   try
                   String Command=din.readUTF();
                   if(Command.compareTo("SEND")==0)
                        System.out.println("\tSEND Command Received ...");     
                        ReceiveFile();
                        continue;
                   catch(Exception ex)
                        //System.out.println("\tClient Terminated Abnormally ...........");
                        continue;

    Please note that this is not an FTP client and server. FTP is defined by a standard IETF protocol and this isn't it.
    Then, move the following lines:
    din=new DataInputStream(ClientSoc.getInputStream());
    dout=new DataOutputStream(ClientSoc.getOutputStream());
    System.out.println("FTP Client Connected ...");
    System.out.println("External IP of Client ..." + ClientSoc.getInetAddress());
    //System.out.println("FTP Client Connected ..."+ClientSoc.getRemoteSocketAddress());from the constructor into the run() method. i.e. don't do anything with the socket in the thread which handles the accept().

  • How to marking email for follow up on a specific date

    In projects I often receive e-mails which need to be followed up/chased by a specific date in the future. I would like to be able to mark them with a specified date and then file them in the relevant mail folder. On the date specified either the email re-appears in your in box for action or a reminder is sent.
    The flag option is fine - but does not really help if one has many e-mails to follow up on different dates.
    This must be feature which would be useful to 1000's of users - does it exist is there a work round? I have not found this feature on other e-mail applications including Yahoo.
    Thanks in advance.

    There are always programs on http://www.tuaw.com that do things like this. I don't know if any of them specifically do this. They always want to suck you in and live in their little iGTD world. I don't really conform to that. I am trying to write software that I would want to use. This seems like one that would fall into that category. Simple, easy-to-use, does one thing well, and doesn't get in your way.

Maybe you are looking for

  • Datapump help - cant get it to work

    This is my script: create or replace directory EXPORT as 'e:\aia\backup\dmp\'; declare      l_dp_handle NUMBER; begin l_dp_handle := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'SCHEMA', remote_link => NULL, job_name => 'GTAIATB4_UPGRADE_E

  • Best format for exporting

    Hi, I recorded some video with a Panasonic DMC-LX1 camera which records in .mov format at 30fps, 480x848 (16:9) format. I imported into imovie in DV widescreen format, as this was the only way i could find of keeping the original format without lette

  • Purchase order with out PR Reference controlling to control

    Dear All               I wants to control purchase order creation without PR Reference. i want to control this via standard settings is it possible through standard. Purchase order creation Through PR only. if user enter powithout pr reference it sho

  • HT1937 I can't find routes or direction on maps when navigation in my country JORDAN

    I can't find routes or direction on maps when navigation in my country JORDAN

  • ORA-00937, TREAT and NOT IN

    Hi, I'm using Oracle 10g, and I have this query: sql = "SELECT TREAT(VALUE(A) AS TEXT).ORIGINAL_TEXT, ID, NAME FROM TABLE_A A WHERE (A.ID, A.NAME) NOT IN (SELECT ID, NAME FROM TABLE_B)" then I do: Connection.createStatement(ResultSet.TYPE_SCROLL_INSE