Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you use a Variable in (Library/File) in this format

Status
Not open for further replies.

Rounak

Programmer
Jul 12, 2022
1
IN
If my 1) Lib IS A FIELD NAME AND THAT FIELD CONTAIN LIBRARY LIST
2) Fil IS A FIELD NAME AND THAT FIELD CONTAIN FILE NAME LIST
Then hOw can I use this in SQLRPGLE code

CNT = VARIABLE
ORD IS FIELD NAME IN PHYSICAL FILE
ORDERNO IS NAME OF INPUT FIELD ON DISPLAY FILE


C/EXEC SQL
C+ SELECT COUNT(*) INTO :CNT FROM LIB/FIL
C+ WHERE ORD= :ORDERNO
C/END-EXEC

PROBLEM= I WANT THE VARIABLE INSIDE OF LIB AND FIL TO SELECT BUT IT IS SELECTING LIB AND FIL

PLEASE HEPL ME TO SOLVE THIS PROBLEM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top