Problem solve Get help with specific problems with your technologies, process and projects.

Use SQL to analyze your RPG program

When you use SQL to analyze your RPG source you can set up a search for multiple values in one statement.

You can use SQL to analyze your RPG source (or any source member for that matter). Using SQL to analyze your source member has advantages over scanning a source in SEU because you can set up a search for multiple values in one statement as opposed to doing multiple scans/searches.

First, set up an ALIAS to direct SQL to use a specific member. In this example I want to poke around in the source for P4210. . .

CREATE ALIAS QTEMP/A4210 FOR ABTSRC73/JDCSRC (P4210)

Then you can do regular SELECT statements such as the following. The following statement will show me any statement that has mod markings that references the currency code data item (CRCD):

select * from a4210 where srcdta like 'M0%' and srcdta like '%CRCD%'


Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close