ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CPYTOIMPF issue with blank

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

  • CPYTOIMPF issue with blank

    Hi All,

    We are copying the records from PF to Flatfile using CPYTOIMPF with delimiters("|").
    Records are copied but if a field doesn't have value then there is space between two delimiters. Our requirement is we need to have delimiter without space. We have used remove blank option as *BOTH as well.

    flat file output :-

    AAWSRC|FORT|12345|600012
    AASWCR| |54321|210006

    Requirement:
    AAWSRC|FORT|12345|600012
    AASWCR||54321|210006


    Regards,
    Sudha
    The Secret Of Achieving Your Goals Is Revealed Before Your Eyes.
    System Engineer

    Sudha...

  • #2
    Re: CPYTOIMPF issue with blank

    You can only achieve your results with tables that have fields that allow null. If it does not allow null, then a string will have a default of one ' ' and the *BOTH will not take action upon this.

    Ex: all of these filed allow null.

    Code:
     Column name  Calculation  Box   
        ALL       -            THIS  
        ALL       NOT          THIS
    Code:
     ************Beginning of data************** 
    ALL||THIS                                    
    ALL|NOT|THIS                                 
     ************End of Data********************
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment

    Working...
    X