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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Views

Status
Not open for further replies.

sburden

Programmer
Dec 4, 2002
35
US
Hello All,

I have a situation where I have 2 physical files. File A and File B for the sake of this discussion. File A is my base PF, meaning the fields in here won't change. However in File B, on occasion fields will be added and dropped. I would like to create a relationship between the two files or tables so I can have access to new fields as they are added. I familiar with creating PF and LF but we would like to get around having to recompile all programs that use File B. I was told I could create a view. Is it possible to read a view in RPGLE? Or would I have to do embedded SQL to read the view.

Any help on this topic will be appreciated.

 
Hi.
Yes you can read sql view as you read logicals in rpg. Only thing is that you have to use rename keyword for the record format.
 
Pekka,

Thanks for responding to my question. I have one more. Will I need to recompile my programs that use the SQL View as fields are added and deleted in File B?

Stevie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top