Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    13

    Unanswered: db2 quey user prompt

    How do I code an user prompt in a mainframe DB2 query?

    Thanks,
    Don

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    DB2 itself does not support that. But if you are using QMF, then put an ampersand in front of the variable.

    select * from emp where empno = &empno_input

    If you are using something besides QMF, you are out of luck (unless the query interface itself has a facility like QMF for variable prompting). SPUFI has no such facility unless they added it very recently.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •