Page 1 of 1

parametrizing the arguments of cat command

Posted: Fri Sep 22, 2006 7:43 am
by tostay2003
I want to concatenate two files file1 and file2 and use that in sequential file stage.

cat file1 file2

Can I use cat #file1# #file2# (i.e) parametrizing them? and where can I write this cat command?

Posted: Fri Sep 22, 2006 7:47 am
by RAJEEV KATTA
Pass the two files as a file pattern in sequential file and load it into a sequential file,it would resolve your problem.

Posted: Fri Sep 22, 2006 7:50 am
by tostay2003
I didnt not get that. could you explain it in detail?

Posted: Fri Sep 22, 2006 7:59 am
by gateleys
tostay2003 wrote:I didnt not get that. could you explain it in detail?
Rajeev meant that you could use the Filter command in Sequential file stage, where you pass the 2 filenames as parameters.
Don't forget to use an existing file in the Input 'FileName' box.
gateleys

Posted: Fri Sep 22, 2006 8:08 am
by tostay2003
Don't forget to use an existing file in the Input 'FileName' box.
What should this FileName be File1 or File2?

or should i write

Code: Select all

cat #File1# #File2# > #File3#
and use the FileName as #File3#

Posted: Fri Sep 22, 2006 8:29 am
by gateleys
tostay2003 wrote:What should this FileName be File1 or File2?

or should i write

Code: Select all

cat #File1# #File2# > #File3#
and use the FileName as #File3#
For the filename, you could use /dev/NUL
In the filter command, use
cat #File1# #File2#
Don't specify the target file in the command. Make sure that the path is specified in the value of the 2 parameters and also check if you have permissions on those file.

gateleys

Cat?

Posted: Fri Sep 22, 2006 1:12 pm
by mcolen
Why use a before/after subroutine of cat a,b > c when you can (provided formats are the same) use a link collector to do the same work in the job.

Re: Cat?

Posted: Sat Sep 23, 2006 11:13 am
by gateleys
mcolen wrote:Why use a before/after subroutine of cat a,b > c when you can (provided formats are the same) use a link collector to do the same work in the job.
Why link collector when the same can be done using cat in before/after subroutine?
Why cat in before/after subroutine if it can be achieved using Filter command in sequential file?
Why the above, if it can be done using the Command stage or the Execute Command at the sequence level?

Why? why? why?

Lots of choices, eh!!! :wink: