I already found the answer to my questions. I will share them , just in case someone also has the same problem.
To create a procedure and save it into a specific DB we need to create a sql file, inside the file we can put the CREATE PROCEDURE command, then just load into the DB using dbaccess. for example my database is db32 and my file is answer.sql I will have to execute:
dbaccess db32 answer.sql
If we want copy the procedures that exist in one database to later copy them into any other db, we need to use dbschema, the name of the database, the name of the procedure and the name of the file where we are going to save the procedure.
For example, my database is db78, my procedure is work_all_day(int ) and my file is saveithere.sql
I would have to run:
dbschema -d db78 -f work_all_day saveithere.sql
I hope this can be useful for someone
