How to write bash shell script for mentioned requirement?

Hi All,

I am unable to write the script for the below requirement.

Requirement:
Main table dir_ancillary table contain three column "dir_ancillary.table_name"," dir_ancillary.text_file_name ", "dir_ancillary.Include" .
This dir_ancillary contain undefined tables in the column "dir_ancillary.table_name".

I need to write the script like the way- IF "dir_ancillary.Include" column contain 'Y' value for "dir_ancillary.table_name" then I need to unload all of the data for that dir_ancillary.table_name to a file name that is contained in dir_ancillary.text_file_name and include it in the Ancillary.zip file .

Please let me know how could it posibble to make it by Unix script becaue we have unlimited (not defined) tables in table_name column. It is dynamic .it could be 10 or 30,50 , 90. any number.

Please reply me.

Thanks Unix team for helping me.

Which DB are the tables in and what CLI client do you use?

Is that client scriptable ?

The actual command will look something like

 
for i in $(db_client_select_column) 
  do 
  if [ $i ==  "Y" ]
    then db_dump_table_command
  fi
done

Hi ,

Database is Informix database. sorry I didn't get CLI client. What is this ? Sorry I am new for Unix . I have to write the script to get the data from Informix database to Unix server.