[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Append two files together in an SQR???
Whoa whoa whoa, try this (take advantage of unix's CAT command)
First, build your system string:
let $system_string = 'cat ' || $filename1 || ' ' || $filename2 || ' >' ||
$merge_filename
call system using $system_string
Here's our real-world example:
let $chsba701 = 'cat' ||' {CHSBENINTERFACEFILEPREFIX}CHSBA701_' || $run_id ||
'.dat' ||
' {CHSBENINTERFACEFILEPREFIX}CHSBA702_' || $run_id ||
'.dat' ||
' >{CHSBENINTERFACEFILEPREFIX}CHSBA701mrg_' || $run_id
|| '.dat'
call system using $chsba701 $chsba701_status
if $chsba701_status <> ''
show 'There was an error concatenating the CHSBA701 and CHSBA702 (Advantek)
files.'
end-if
Brian Pelton
System Analyst
Rick_Creel@aoncons.com@sqrug.org on 02/10/2003 12:00:47 PM
Please respond to sqr-users@sqrug.org
Sent by: sqr-users-admin@sqrug.org
To: sqr-users@sqrug.org
cc:
Subject: Re: [sqr-users] Append two files together in an SQR???
Open the first file FOR-APPEND
Open the second file FOR-READING
Read the second file and write its records to the first file.
"Katchur, Ken SS"
<Ken.Katchur@govmail To:
sqr-users@sqrug.org
.gov.sk.ca> cc:
Sent by: Subject: [sqr-users]
Append two files together in an SQR???
sqr-users-admin@sqru
g.org
02/10/2003 02:49 PM
Please respond to
sqr-users
Is there a way to append to files together in an SQR? I would prefer to
run
this SQR on the server in UNIX.
Thanks Ken
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users