1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Daily Admin script not working after upgrade/migration to TSM 6.3

Discussion in 'Scripting' started by AndrewEvans, Aug 1, 2012.

  1. AndrewEvans

    AndrewEvans Newcomer

    Aug 1, 2012
    Likes Received:

    Yesterday we migrated and upgraded our TSM server from 5.5 to 6.3
    We did this with the help of a consultant and everything went well.

    However this morning we noticed that our Daily admin tasks hadn't run.
    When we try to run it manually we get the following error.

    ANR1469E: Command script DAILY_BACKUPS, Line 40 is an INVALID command : got retry.
    ANR1463 RUN: Command script DAILY_BACKUPS completed in error.
    ANS8001I Return code 3.

    Line 40 as you can see is "if (rc_ok) goto retry".
    When looking at our Daily_Backups script we noticed that some of the If statements have a space between the if and the open bracket and thought that maybe the new TSM version is more picky about this?

    We then tried to update line 40 removing this space but that throws an error about line 50... if we then try to remove the space from line 50 it throws an error about line 40.

    upd script daily_backups "if(rc_ok) goto retry" line=40
    ANR1469E UPDATE SCRIPT: Command script DAILY_BACKUPS, Line 50 is an INVALID command : got retry.
    ANS8001I Return code 3.

    None of the current staff were involved in creating this script originally and our overall TSM knowledge is still relatively limited.
    Are we on the right track with this reasoning, anything else anyone can advise we try?

    I'm getting an error trying to upload our script at the moment.

    Thanks very much for any advice you can give.

    Sorry for wall of text, getting an error when trying to upload script.

    1 /*----------------------------------------------------*/
    10 /* Script DAILY_BACKUPS */
    20 /* Descr: */
    30 select * from sessions where upper(session_type)='NODE'
    35 /*----------------------------------------------------*/
    40 if (rc_ok) goto retry
    45 select * from processes where upper(process)='BACKUP STORAGE POOL'
    50 if (rc_ok) goto retry
    90 /*----------------------------------------------------*/
    92 select * from stgpools where stgpool_name='BACKUPPOOL' and pct_utilized=0
    94 if (rc_ok) goto lab0
    96 ba stg backuppool copytpool maxproc=4 wait=yes
    97 if(ok) goto lab0
    98 q stg backuppool
    99 lab0:
    100 select * from stgpools where stgpool_name='TAPEPOOL' and pct_utilized=0
    110 if(rc_ok) goto lab1d
    120 ba stg tapepool copytpool maxproc=2 wait=yes
    130 if(ok) goto lab1d
    131 q stg tapepool
    135 lab1d:
    138 if (rc_ok) goto lab1
    140 q stg tapepoolt4
    141 if(ok) goto lab1
    149 q stg tocpool
    500 lab1: select * from stgpools where stgpool_name='FINDISKPOOL' and pct_utilized=0
    505 if (rc_ok) goto lab1a
    510 ba stg findiskpool copytpool maxproc=4 wait=yes
    511 if(ok) goto lab1a
    513 q stg tdp_tapepool
    515 lab1a: select * from stgpools where stgpool_name='ARCHTAPEPOOL' and pct_utilized=0
    520 if(rc_ok) goto lab1b
    525 ba stg archtapepool copytpool maxproc=2 wait=yes
    530 if(ok) goto lab1b
    531 q stg archtapepool
    535 lab1b: select * from stgpools where stgpool_name='CM_DISKPOOL' and pct_utilized=0
    537 if (rc_ok) goto lab1c
    540 ba stg cm_diskpool copytpool maxproc=4 wait=yes
    541 if(ok) goto lab1c
    542 q stg cm_diskpool
    543 lab1c: select * from stgpools where stgpool_name='FINTAPEPOOL' and pct_utilized=0
    545 if (rc_ok) goto lab2
    546 ba stg fintapepool copytpool maxproc=2 wait=yes
    548 if(ok) goto lab2
    549 q stg cm_tapepool
    550 lab2: ba db type=full dev=lto3class wait=yes
    560 if(ok) goto expire
    600 expire:expire inv wait=yes
    602 if(ok) goto migrate
    603 migrate: del sched migrate_on type=a
    604 def sched migrate_on t=a cmd='run migrate_on' active=yes startt=NOW+01:15 peru=o
    605 reclaim: del sched reclaim_on type=a
    610 def sched reclaim_on t=a cmd='run reclaim_on' active=yes startt=NOW+3:00 duration=2 peru=o
    620 exit
    700 retry:
    710 cancel session all
    720 del sched retrydaily type=a
    730 def sched retrydaily t=a cmd='run daily_backups' active=yes startt=NOW+0:20 peru=o
  3. AndrewEvans

    AndrewEvans Newcomer

    Aug 1, 2012
    Likes Received:
    Manually edited the script and removed all the spaces at end of lines and between If and (rc_ok).
    Also needed to put the select statements on their own lines.

    eg. lab1c: select * from stgpools where stgpool_name='FINTAPEPOOL' and pct_utilized=0

    select * from stgpools where stgpool_name='FINTAPEPOOL' and pct_utilized=0

    After that don't seem to be getting any errors when running the script.

Share This Page