3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
|
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 3442
def task_structure_dump(task,filename=nil)
if task.configuration.has_key?('ibm_i_dump_savf')
if !task.configuration['ibm_i_dump_savf']
return
end
end
if filename.nil?
filename = task_schema(task)
end
savlibtime = Time.now
lastyear = Time.new(Time.now.year.to_i - 1)
savf = "RB" + (Time.now.to_i - lastyear.to_i).to_s
begin
cmd = "CRTSAVF FILE(QGPL/#{savf}) TEXT(''#{filename} #{savlibtime}'')"
qcmdexc cmd
task.log(cmd)
rescue Exception => e
puts e.message
task.log("#{cmd} : #{e.message}")
end
begin
cmd = "SAVLIB LIB(#{filename}) DEV(*SAVF) SAVF(QGPL/#{savf}) CLEAR(*ALL)"
qcmdexc cmd
task.log(cmd)
rescue Exception => e
puts e.message
task.log("#{cmd} : #{e.message}")
end
end
|