![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing global variable to a function which is called by another function | sars | Shell Programming and Scripting | 4 | 06-30-2008 11:39 AM |
| Error in functions : file2: function: not found | padarthy | Shell Programming and Scripting | 2 | 10-10-2007 10:55 PM |
| Installation Procedure.. | mcseramana | HP-UX | 2 | 07-22-2007 12:30 AM |
| how can i check in csh if command found or not found ? | umen | Shell Programming and Scripting | 2 | 03-03-2007 07:38 PM |
| Installer script -- function not found error | asutoshch | Shell Programming and Scripting | 1 | 07-10-2006 02:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
procedure/function not found in .ksh
Hi all ,
I am getting an error "job_procfile not found" while excecuting a .ksh script. The script is used to create control-m ( scheduler ) jobs dynamically by reading parameter files ( flat filescomma seperated ) job_procfile is a function within the .ksh script The script is something like this ... ****************script start ********************* job_procfile { set string to call control-m job creation ( ctmcreate ) eval(string) } job_multiprocess { read parameter files and init values ( awk ) for loop based on multiple processes defined fo a stream do call job_procfile -----> (B) done } loadstream { if some value then call job_procfile -----> (A) else call job_start if value is multiprocess then call job_multiprocess else call job_procfile fi call job_success fi } # main read files in awk ( do search to get values ) call loadstream ( to load control-m streams ) ****************script end ********************* When job_procfile is called at (A) it works fine. But when called from within job_multiprocess (B) it comes up with the error message "job_procfile not found " Any ideas ? Thanks ! |
|
||||
|
sorry should have been more specific ..
I have mentioned the framework of the shell script i.e. not the entire script "Call" refers to calling the sub routine ( procedure ) I the program itself its just if [[ ..something ...]] then job_procfile ( i have written this down as call job_procfile for clarity ) fi The entire script runs over 600 lines and if required I can paste it over here ... Thanks . |
|
||||
|
Quote:
Have you tried debugging using Code:
#!/bin/ksh -x |
|
||||
|
all functions have been defined . I have missed putting the () after function names in the pseudo code. The strange bit is that the function call works from within one of the if condition blocks , but comes up with this error message when called from within a function .
Tried to debug using -x but the output lists only the code outside the functions i.e. any code the functions is not listed. I am working on AIX 5.3 on an IBM P590 . |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|