954,525 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem in Korn shell script

Hi i am facing this problem, please help me in my korn script

-------------------------------------------------------------
export $job_ids


echo "#Message creation" >message-typing.typ
chmod 777 message-typing.typ
echo "orderParser:1:999:210:T" >>message-typing.typ
echo "*REQUEST=FLOWTHRU;JOBID=${job_ids};OLD_DD=20050629000000;%" >>message-typing.typ


cat message-typing.typ
-------------------------------------------------------------

Now the job_ids is a variable consisting of job id, and if u see i have exported this variable too.
However, the message-typing.typ file when i see through the debugging mode consists of job id value, but once the script has terminated this job_id value dissappears, if i run on my unix prompt like
--------------------------------------------------------------
prompt> cat message-typing.typ
#Message creation
orderParser:1:999:210:T
*REQUEST=FLOWTHRU;JOBID=;OLD_DD=20050629000000;%
--------------------------------------------------------------

So any help please

pallavimahjan
Newbie Poster
2 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

the problem seems that the variable $job_id is not being set. I would look at the export command you are using. What value exactly are you trying to export?

shanenin
Posting Whiz in Training
217 posts since May 2005
Reputation Points: 10
Solved Threads: 17
 

job id has value like C2686524196

pallavimahjan
Newbie Poster
2 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

Hi,

I see a problem in the export, it should be

export job_ids

doing "export $job_ids" will export job ids saved in the job_ids variable instead of exporting the variable itself.

Regards,
Ali

pzwcsx
Newbie Poster
1 post since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You