ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CPYF failed because of signed vs. packed

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

  • CPYF failed because of signed vs. packed

    Not sure if this is any use to anyone else but......

    I was converting an old system and had to take an existing
    physical file and rename it and change all the fields names.

    I was unable to use the cpyf command because some of the
    deical fields in the old table were signed (not packed as the new one)

    so I just wrote a quick program here it is
    Code:
    FCOILLABOR IP   E             DISK                              
    FCSICLAB   O    E             DISK                              
    d Labor1        e ds                  extname(COILLABOR)        
    d Labor2        e ds                  extname(CSICLAB)          
                                                                    
     /free                                                          
                                                                    
      labor2 = Labor1;                                              
      cirow = %int(SArow);                                          
      cishel = %int(SAshel);                                        
      write  CSICLABR;                                              
                                                                    
     /end-free
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Re: CPYF failed because of signed vs. packed

    I am wondering how SQL would have handle the conversion?
    Never trust a dog to watch your food.

    Comment

    Working...
    X