IBMiAccess




Results 1 to 4 of 4

Thread: CPYFRMIMPF Command

  1. #1
    Experienced Forum Member
    Join Date
    Mar 2005
    Location
    Hyderabad
    Posts
    56
    Rep Power
    770

    CPYFRMIMPF Command

    Hi,

    I have been using the CPYFRMIMPF for long time. It was working properly. But now one of my manager now says that you should avoid using CPYFRMIMPF as IBM is recommending not to use it. He says that when the data comes from outside system i.e. oracle or unix then CPYFRMIMPF has problems in dealing with nulls. I am currently using the V5R4 version and I believe there is an option to allow nulls if the field has null value but as per him he is saying a part of field value can also be null and it will fail in such cases.


    My requirement is that a pipe delimited file will be sent from Unix box and I have to copy the data to a PF. I have tried copying using the CPYFRMIMPF and it was perfect. I am not aware of any other command which does a copy from pipe delimited file to a PF.

    I would like to know the Pros and Cons of CPYFRMIMPF command.

    Could you please put your thoughts?

    Thanks a lot.

    Regards,
    Rahul

  2. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

  3. #2
    Experienced Forum Member arrow483's Avatar
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    1,743
    Rep Power
    4230

    Re: CPYFRMIMPF Command

    he is saying a part of field value can also be null and it will fail in such cases
    I have never heard of this. A field is NULL or its not. I don't know how you could have a partial null.

    I have tried copying using the CPYFRMIMPF and it was perfect
    To me, that says it all.

  4. #3
    Analyst
    Join Date
    Jan 2005
    Location
    Levittown, PA
    Age
    50
    Posts
    332
    Rep Power
    1324

    Re: CPYFRMIMPF Command

    Maybe this will help?

    http://publib.boulder.ibm.com/iserie...l/cpyfrmim.htm



    CLP:
    Code:
    QSYS/CPYFRMIMPF FROMSTMF('/www/webserver/images/ImageFileMap.txt') +         
    TOFILE(APPCUST30/ARTESIAREF) MBROPT(*REPLACE) STMFLEN(315) RCDDLM(*EOR)    + 
    DTAFMT(*FIXED) RMVBLANK(*NONE) FLDDFNFILE(MIKEH/QDDSSRC IMAGEFILE) 


    DDS (TXT file):
    Code:
    *************** Beginning of data ***********
    - This is comment                            
    - DBFieldname  startpos endpos nullIndpos    
    ASSET_TYPE         1       3      0          
    CO_CD              4       5      0          
    DIV_CD             6       7      0          
    SPCL_CD            8      19      0          
    SSN_CD            20      22      0          
    SSN_YEAR          23      26      0          
    FILE_NAME         27      66      0          
    PHYS_FILE         67     315      0          
    *END

  5. #4
    Experienced Forum Member
    Join Date
    Mar 2005
    Location
    Hyderabad
    Posts
    56
    Rep Power
    770

    Re: CPYFRMIMPF Command

    Hi,

    Please see the below links which says about the problems in CPYFRMIMPF.



    http://sysadminforum.com/t199100.html

    http://archive.midrange.com/midrange.../msg00801.html

    Regards,
    Rahul

  6. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

Facebook Comments


Similar Threads

  1. Replies: 4
    Last Post: April 14th, 2008, 04:06 AM
  2. CPYFRMIMPF command error
    By jhang1522 in forum CLP/CLLE
    Replies: 3
    Last Post: July 18th, 2007, 07:56 AM
  3. OVRDBF and Activation Groups.
    By coder400 in forum CLP/CLLE
    Replies: 8
    Last Post: December 12th, 2005, 09:56 AM
  4. Jobd
    By ris_skma in forum RPG/RPGLE
    Replies: 1
    Last Post: July 27th, 2005, 06:34 AM
  5. Replies: 8
    Last Post: June 17th, 2005, 02:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •