[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Transferring output file within environments using SQRwhen the SQR Report is run on NT
- Subject: [sqr-users] Transferring output file within environments using SQRwhen the SQR Report is run on NT
- From: Raghvendra Dharwada <dharwada@gmail.com>
- Date: Thu, 21 Apr 2005 15:50:12 -0700
- Delivery-date: Thu, 21 Apr 2005 17:51:30 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;b=snTM6P+O1r7vlFCLAAC1Kn9EF7R6wOgmlrqbLF+ujzJ5oEhkS87TRHmicEOZEthP8d+n6T08bM3wL+SwA5pghZLlKmqNYN9rnIJD7xMggWEg4bzwkD7MP+MjXusVNUJFWS0fZ8fl5eYWzNihs0sJ8B7S/h7F5bSDF1vACs5bP8E=
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Hi all,
Can anyone help me how to write a script in an SQR program that can
transfer (copy) a file from one environment to another (say DEV to
TST) (network folders) in Windows NT ?
The scenario is like this:
The SQR is run on NT.
It creates an output file in DEV (in some folder)
This file should be transferred to TST (in some folder)
Here are the software versions I am using
$sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle 8.0.6/Mar 26 2004
PeopleSoft: 8.8
Oracle: 9i
I came across a script that transfers file from UNIX to NT i.e After
the SQR runs on UNIX
it transfers to NT.
The code that I came across is as follows:
I write the script in a file, execute it using the move-files procedure
begin-procedure write-sh-file
let $file-path = 'cd /home/out/payroll'
let $L1 = 'HOST=' || '''x.x.x.x'''
let $L2 = 'USER=' || '''usename'''
let $L3 = 'PASSWD=' || '''pwd'''
let $L4 = 'echo ' || '"remote Login attempted"'
let $L5 = 'ftp -n $HOST <<END_SCRIPT'
let $L6 = 'quote USER $USER'
let $L7 = 'quote PASS $PASSWD'
let $L8 = 'cd /GL/Reports'
let $L9 = 'prompt'
let $L10 = 'put ' || $filename1
let $L11 = 'END_SCRIPT'
let $L12 = 'FTP_RETURN_CODE=$?'
let $L13 = 'if [ $FTP_RETURN_CODE = 0 ]; then'
let $L14 = 'echo ' || '"Transfered Successful, deleting source files"'
let $L15 = 'cd /home/out/payroll'
let $L16 = 'delete ' || $filename1
let $L17 = 'exit 0'
let $L18 = 'else'
let $L19 = 'echo' || '"Transfered failed"'
let $L20 = 'exit 1'
let $L21 = 'fi'
write 2 from $file-path
write 2 from $L1
-----
-----
End-procedure
In the above procedure :
$filename1 = $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance || '.csv'
!-----------------------------------------------------------------------
!Procedure : move-files
!Called By : wrap-up
!-----------------------------------------------------------------------
begin-procedure move-files
let $path = '/export/home/psadmin/scripts/'
let $file = 'sh ' || $path || 'cbgl0007.sh'
call system using $file #status3
if #status3 <> 0
display ' call status: ' noline
display #status3
end-if
if #status3 = 0
display 'Unix script Executed'
end-if
End-Procedure
Now I need a similar or any script, that when the SQR is run on NT and
after it creates an
output file in a specific folder in DEV, it should get transferred to
a folder in TST
or vice versa.
Pls let me know
Thanks
Raghav
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users