Obtain value in variable saved in ksh during fast export

Tools
Enthusiast

Obtain value in variable saved in ksh during fast export

Hi, I have two fast export scripts to make. The first one will query the table and return multiple records saved in an output file. The second one will summarize the data, one of the fields inside the second fast export script is the summary (count) of the no. of records obtained from the fast export.

To do this, I am thinking of counting the number of lines inside the output file of fast export #1 (wc -l) and assigning it to a variable (this is in ksh).

I want to be able then, to get the value of that variable during runtime of the fast export #2.

Is there a way to get the value of that variable? or is there an alternative way for me to count the no. of records (1 record =1line) from the output file of fast export #1 and use that in fast export #2?
2 REPLIES
Junior Contributor

Re: Obtain value in variable saved in ksh during fast export

.ACCEPT ... FROM ENV VAR allows you to access an Environment Variable.

Instead of counting lines you might use grep to filter FExp output for
UTY8722 xxx total records written to output file.

Of course it would be much easier if there was a &SYS....-variable in FExp containing that number.

Dieter
Enthusiast

Re: Obtain value in variable saved in ksh during fast export

Thanks for the response dieter. :) I resorted to using ksh instead of using fexp script no. 2 to make it easier.