Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2012
    Posts
    7

    Unanswered: DBAccess change in version upgrade

    Hello,

    I am upgrading from 7.x to 11.50 and it seems that a script we use has different results now and I am unsure what the change is in DBAccess. We also upgraded from solaris 8/9 to Solaris 10, if that makes a difference.


    It is supposed to return the column names of the table. Note the newlines and repetition of expression in the new output. I would like to understand what changed and what needs to be altered to the script to get the old performance back.

    Thanks!

    The script:
    Code:
    #!/bin/ksh
    
    dbaccess<<!!  2>/dev/null | sed s/\ //g
    database $IDBROOT;
    select trim(trailing from t2.colname)||","
    from systables t1, syscolumns t2
    where t1.tabid = t2.tabid
    and t1.tabname = "$1"
    
    !!
    The old output:
    Code:
    $ get_colnames em_parm
    
    
    (expression)
    
    ez_rev,
    ez_crt_rev,
    ez_em_bom,
    ez_multp_stat,
    ez_matf,
    ez_fix_oh_dlr,
    ez_off_line,
    ez_prod_flag,
    ez_inv_draw,
    ez_lot_ser,
    ez_time_uom,
    ez_mc_engr,
    ez_cost_engr,
    ez_mark_engr,
    ez_purch_engr,
    ez_fm_int,
    ez_gl_int,
    ez_om_int,
    ez_hr_int,
    ez_uom,
    ez_ecn,
    ez_ec_nbr,
    tstamp,
    ez_autorev_up,
    The new output:
    Code:
    $ get_colnames em_parm
    
    
    
    (expression)ez_rev,
    
    (expression)ez_crt_rev,
    
    (expression)ez_em_bom,
    
    (expression)ez_multp_stat,
    
    (expression)ez_matf,
    
    (expression)ez_fix_oh_dlr,
    
    (expression)ez_off_line,
    
    (expression)ez_prod_flag,
    
    (expression)ez_inv_draw,
    
    (expression)ez_lot_ser,
    
    (expression)ez_time_uom,
    
    (expression)ez_mc_engr,
    
    (expression)ez_cost_engr,
    
    (expression)ez_mark_engr,
    
    (expression)ez_purch_engr,
    
    (expression)ez_fm_int,
    
    (expression)ez_gl_int,
    
    (expression)ez_om_int,
    
    (expression)ez_hr_int,
    
    (expression)ez_uom,
    
    (expression)ez_ecn,
    
    (expression)ez_ec_nbr,
    
    (expression)tstamp,
    
    (expression)ez_autorev_up,

  2. #2
    Join Date
    Oct 2012
    Posts
    7
    A rudimentary fix was to alter the first line

    dbaccess<<!! 2>/dev/null | sed -e 's/(expression)//g' -e '/^$/d' -e 's/\ //g'

    I still don't know why it is acting differently, but I did notice that the syscolumns.colname type has changed from char(18) to varchar(128,0), which I am thinking maybe be part of the problem?

  3. #3
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    Hey that's a more than 15 years jump, and about 6 major releases jump....
    Some cosmetic things have changed in dbaccess output. Also all numbers are stated as decimals.
    Safest and most stable way in this case is to unload to a file, and filter out '|' with sed or awk.

    Other question: why update to 11.50 provided that current version is 11.70 ?

Posting Permissions

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