Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6079893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:59:54+00:00 2026-05-23T10:59:54+00:00

I had a stored procedure with no arguments which was invoked form the UNIX

  • 0

I had a stored procedure with no arguments which was invoked form the UNIX
script by db2 call and the SP was working fine and script running fine as well.

The new requirement is to pass a file name to the stored procedure and do some
business logic — I am not able to pass the file name from UNIX to the SP. I am using IN parameter of Varchar(50).

The SP compiled fine and is available in the correct schema — I invoked
using multiple ways and none of them are working fine.

Please help me debug this.

DB2 Stored Procedure:

CREATE PROCEDURE ABC.sp_Update(IN FILE_NAME VARCHAR(50))

Different methods I tried Calling the DB2 stored proc from the UNIX script

  1. db2 call "ABC.sp_Update("filename.txt")"

  2. db2 call "ABC.sp_Update(("filename.txt"))"

  3. FILE_NAME="filename.txt"
    db2 call "ABC.sp_Update($FILE_NAME)"
    
  4. FILE_NAME="filename.txt"
    db2 call "ABC.sp_Update($(FILE_NAME))"
    

The error I get:

db2 call ABC.sp_Update(filename.txt)
SQL0206N  "FILENAME.TXT" is not valid in the context where it
is used.  SQLSTATE=42703

When I checked for the execution status of the command I get a return code 4

+ RC=4

Before the code change, this worked fine:

db2 call "ABC.sp_Update()"

When I Googled the description of the error 42703, it is An undefined column, attribute, or parameter name was detected.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:59:55+00:00Added an answer on May 23, 2026 at 10:59 am

    Sorry Guys – Should have used a single Quote – It worked – Thanks and sorry

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am converting a stored procedure which I had previously written as a string
I do a call to an oracle stored procedure using JDBCTemplate which has an
I had stored procedure which get data where Id=@id and the @id which pass
Had received a module from CCAVENUE and it was working fine with Magento 1.6.2...
I have a stored procedure which uses a FOR XML statement at the end
We had a Stored Procedure written and it had a GRANT written at the
I had to change the SQL stored procedure to ORacle stored procddure.I am able
I've been working on improving the performance of a stored procedure and there is
I had a need to pass an integer array to a stored procedure from
I'm using paging which uses a stored procedure to filter by letter. I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.