A few minutes ago I submitted a possible solution to the indicated problem
with some concerns regarding the state of the files involved in a store
operation if the store job is aborted 'after' the files have been flagged for
storing. It then occurred to me that another method would be for the
monitoring job to 'REPLY 0' to the pending tape request and thus the store
program would 'free' up the 'locked' files.
I've made the necessary changes to the previously submitted stream files and
I'm submitting it again.
Sorry for the waste of band width.
<<Start of backup job>>
!job backup,.....
! ...
! ...
!comment
!comment Setup a file to 'pass' the needed data to the monitor job
!comment
!purge Bkupfile
!build Bkupfile;rec=-72,,f,ascii
!file BK=Bkupfile,old
!setvar backuptape "BACK001"
!echo setvar backuptape "!!backuptape" > *BK
!echo setvar backupjob "#!hpjobtype!hpjobnum" >> *BK
!
!stream monitorj
!comment
!comment Give time to the 'monitor' job to logon and setup
!comment
!Pause 60
!
!file t = !backuptape
!store @[log in to unmask]@;*t;.....
!
!eoj
<< Start of monitor job >>
!job monitorj,......
! ...
!comment
!comment 'Receive' the 'passed' info from the backup job
!comment
!xeq Bkupfile
!showvar backup@
!setvar jn_len len(backupjob)
!comment Set some environment variables
!
!setvar initial_delay 600
!comment Wait !init_delay seconds to allow the backup job to 'lock'
!comment the files of the file set being stored.
!comment
!setvar iterations 5
!setvar delay 600
!
!Pause !initial_delay
!build rcfile;rec=-100,,f,ascii;msg;temp
!file rc=rcfile,oldtemp
!setvar loop 0
!setvar g_reply_pending 0
!setvar loop_done false
!setvar replied false
!while loop < iterations AND NOT loop_done
! setvar loop loop + 1
! echo *** LOOP # !loop ***
! echo *** Recall Start *** > *rc
! recall >> *rc
! echo *** Recall End *** >> *rc
! setvar loop2 0
! setvar recall_size finfo("*rc",'eof') - 1
! setvar reply_pending 0
! while loop2 < recall_size
! setvar loop2 loop2 + 1
! input recall_text;wait=2 < *rc
! echo !recall_text
! if pos(backuptape,recall_text) <> 0 then
! setvar reply_pending reply_pending + 1
! setvar reply_pending reply_pending + 1
! setvar backup_pin &
! str(recall_text,(pos("!backupjob",recall_text)+jn_len + 1),10)
! setvar backup_pin str(backup_pin,1,pos("/",backup_pin)-1)
! endif
! endwhile
!
! if reply_pending = 0 then
! if g_reply_pending <> 0 then
! setvar replied true
! setvar loop_done true
! endif
! else
! setvar g_reply_pending g_reply_pending + 1
! endif
!
! if NOT replied then
! Pause !Delay
! endif
!endwhile
!
!if NOT replied AND g_reply_pending > 0 then
! reply !backup_pin , 0
!endif
!eoj
Regards
Paul H. Christidis
[log in to unmask] 714 732-7114
|