sponsored links

Collapse

Announcement

Collapse
No announcement yet.

CPYFRMIMPF Command

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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
      Your friends list is empty!

      Comment


      • #4
        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

        Comment

        sponsored links

        Collapse

        Working...
        X