Difference between revisions of "RSE"

From MidrangeWiki
Jump to: navigation, search
(Other actions)
(Searching for text)
Line 112: Line 112:
 
...and check the ''Regular expression'' box.
 
...and check the ''Regular expression'' box.
  
The key here is that we're using a regular expression to do the work.  This particular expression is looking for the literal characters '''around''' followed by one or more white spaces (\s+) followed by the literal characters '''tag'''.  Note that the Java regular expression rules are in use.  [http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html]
+
*The key here is that we're using a regular expression to do the work.   
 +
*This particular expression is looking for the literal characters '''around''' followed by one or more white spaces (\s+) followed by the literal characters '''tag'''.   
 +
*Note that the Java regular expression rules are in use.  [http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html]
  
This may not seem like a very useful thing until you try to search for '''END TAG'''. Searching for ''end'' can be a slow process given the number of ways those 3 letters are used!  An additional use is when you don't know if the target of your search is a TAG or an ENDSR (yes, you can GOTO an ENDSR!)  This regexp is useful for that situation:<br>
+
*This may not seem like a very useful thing until you try to search for '''END TAG'''.
 +
*Searching for ''end'' can be a slow process given the number of ways those 3 letters are used!   
 +
*An additional use is when you don't know if the target of your search is a TAG or an ENDSR (yes, you can GOTO an ENDSR!)   
 +
*This regexp is useful for that situation:<br>
 
findText regularExpression around\s+[tag,endsr]<br>
 
findText regularExpression around\s+[tag,endsr]<br>
  

Revision as of 07:10, 18 December 2007

RSE, an acronym for Remote System Explorer, which is part of WDSC.

It allows you to navigate remote systems in a native context.

On the iSeries, the RSE allows you to navigate through Libraries, Objects, Files, Source Members, IFS files, Jobs, and Commands. For each type, context appropriate options are available through a pop-up menu.

Running a user action

This is conceptually like running a user option in PDM.

Summary:
Go to an iSeries command line and prompt your command. Fill in the parameters with place holders instead of actual values. Don't press Enter, press F14 to see a summary of the command. Copy that onto the clipboard.

Go to the Remote Systems view. Right click on an object or member and choose User actions From there, choose Work With User Actions...

Detail:
For this example, let's use CVTRPGSRC

Go to an iSeries command line and prompt CVTRPGSRC. Substitution variables you can use:

&B - List type: X=library list, L=Library, O=Object, M=Member, J=Job, I=IFS
&C - Name of this user action
&D - Last modified date
&E - Run in batch *YES/*NO
&F - File name containing member
&G - JOBD library
&H - JOBD name
&MF- Temp file name (invoke once)
&ML- Temp lib name (invoke once)
&MM- Temp mbr name (invoke once)
&N - Resource/member name
&O - Object library
&P - Compile in batch *YES/*NO
&R - Replace when compiling *YES/*NO
&S - Object/member type without asterisk
&T - Object/member type with asterisk
&U - User ID that made the connection
&X - Object/member text in single quotes
&Z - Connection name

The resulting command after pressing F14:

CVTRPGSRC FROMFILE(&L/&F)      
          FROMMBR(&N)          
          TOFILE(&L/QRPGLESRC) 
          TOMBR(&N)            
          LOGFILE(*NONE)       

Go to the Remote Systems view, right click a member or object. Choose User actions From there, choose Work With User Actions... This is CVTRPGSRC, so it's a member action not an object action.

Action name: cvtrpgsrc
Comment: <blank>
Command: Normal command
paste the above command into the command window

Check the Refresh after box - this will refresh the view after your command has run. This is handy if your filter includes both QRPGSRC and QRPGLESRC.

Check the Show action box - this will display this action only for the types you select in the Resource types for which this action will appear box below. The idea is that you don't want to accidentally run CVTRPGSRC on CL...

Choose the RPG defined type and add it to the Selected Types list.

You might want to edit the types (click on the EDIT(H) button) so that the option will not appear for RPGLE and SQLRPGLE Types. Tends to make them unusable.

Click Create then Close

To use your new command, fire up the Remote Systems view
Right click an RPG source member
..User Actions
....cvtrpgsrc

You should now have a QRPGLESRC version of your RPGIII member.

User actions are stored (WDSC 6.0) in a file called uda.xml in the path ...workspace\RemoteSystemsConnections\{MY_USR_NAME}\UserActions\ibm.files400\uda.xml

V7.0 example of user action XML:

<?xml version="1.0" encoding="UTF-8"?>
<Actions release="7.1.1">
<Domain Name="Member" Type="Member">
<Action Collect="False" Enable="True" Name="cvtrpgsrcbuck" Prompt="False" Refresh="True" RunEnv="normal" SingleSelection="False">
<FileTypes> RPG400</FileTypes>
<Comment/>
<Command>CVTRPGSRC FROMFILE(&L/&F) FROMMBR(&N) TOFILE(&L/QRPGLESRC) TOMBR(&N) LOGFILE(*NONE)</Command>
</Action>
</Domain>
</Actions>

Searching for text

Example: Searching for a target of a GOTO in RPG. The actual source code looks like
C AROUND TAG

So we're looking for the target of GOTO AROUND.

To search for this from the command line,
findText regularExpression around\s+tag

To search for this from the search dialogue,
around\s+tag

...and check the Regular expression box.

  • The key here is that we're using a regular expression to do the work.
  • This particular expression is looking for the literal characters around followed by one or more white spaces (\s+) followed by the literal characters tag.
  • Note that the Java regular expression rules are in use. [1]
  • This may not seem like a very useful thing until you try to search for END TAG.
  • Searching for end can be a slow process given the number of ways those 3 letters are used!
  • An additional use is when you don't know if the target of your search is a TAG or an ENDSR (yes, you can GOTO an ENDSR!)
  • This regexp is useful for that situation:

findText regularExpression around\s+[tag,endsr]

Here, the items in the square brackets indicate or, so we are searching for
around
...some spaces...
either tag or endsr

Neat!

Other actions

RSE provides ways to group items together for your convenience. One way is through RSE connections and another is through RSE_filters.

Categories

Return to WDSC tips