Difference between revisions of "WDSC tips"

From MidrangeWiki
Jump to: navigation, search
(Debug and SEP Service entry prints)
(Debug and SEP Service entry prints)
Line 333: Line 333:
 
==Debug and SEP Service entry prints==
 
==Debug and SEP Service entry prints==
 
There is a detailed entry here [[Service Entry Point]]
 
There is a detailed entry here [[Service Entry Point]]
 +
 +
Return to Top. [[WDSC_tips#Contents|WDSC tips]]
  
 
==External links==
 
==External links==

Revision as of 08:13, 17 December 2007

This is a dump of tips gathered from the WDSCI-L list

List libs, objects, members, etc with descriptions?

Is there a way to list libs, objects, members, etc in the Remote Systems view with descriptions?

  • The tree view doesn't support this - although if you look at the properties view - you will see the description when an item is selected in the tree view.
  • You should probably try the table view. Window>Show View>Other (or iSeries Table View)

Can I condition page ups and downs by cursor position?

  • Or at least jump the cursor to the top or bottom of the displayed view, then I could roll by line up or down.
  • Keys can be easily remapped to do other things - check the mailing list archives for discussions on this at length.
  • You'll also want to read the reference help for what LPEX actions are available/do (scrollTop, scrollUp come to mind)

Try this from the archives; How to set an Alt + xx key to position the current line to the top or bottom of your source window. [1]

  • I use the alt page up and down keys,
  • I also have alt + T set to put the current line at the top of the editor window.
  • Ctrl+T (v7) will put the line where the cursor is at the top of the screen.

Do I have to continually save my work?

In SEU, when I hit <enter>, I know it has been saved, even if I lose my session.

  • Remote Systems LPEX Editor has an auto-save feature.
  • Default is set to every 5 minutes.
  • Check out Windows>Preferences, Remote Systems>Remote Systems LPEX Editor

I save every PC document after every few lines. Virtually all PC software recognises Ctrl-S as the 'Save' sequence.

Position my cursor to where I need to key additional data. (On IBM rqmts list)

In SEU, when I hit enter, the editor will automatically position my cursor to where I need to key additional data? I know tab moves me to the next input position, but not whether it requires input. And by the time auto syntax checking informs me, I have spent time reading the message, relocating my cursor, etc.

  • There is no way to currently do this. It is on IBM's list of requirements.

Automatic cursor positioning can be configured by choosing 'Preferences' from the 'Window' menu. In version 7, you are looking for Remote Systems -> Remote Systems LPEX Editor -> iSeries Parsers -> ILE RPG

Do I have to use the mouse to copy lines from one member to another?

Standard windows copy/paste keys can be used, along with a few extras provided in LPEX (check the Edit menu for selection options)

To copy X lines,

  • put your cursor is on the first line of the block you want to move,
  • press Home,
  • then hold Shift and press the down arrow X times.
  • Now press Ctrl+C,
  • then Shift+F6 (this is like Alt-Tab in windows, but for LPEX editor tabs) until you get to the target member.
  • Now find the line you want to insert at, and press Ctrl+V.

Another method not mentioned yet is to

  • mark the lines to copy using Alt-L,
  • then copy them into position using Alt-C.

The lines will be inserted beginning with the line after your cursor position. You should also explore the other Select/Selected functions, which are listed under the Edit menu with their keyboard shortcuts.

For a list of WDSC keyboard shortcuts, see WDSC_shortcuts

How can I copy field names in to the member? (On IBM rqmts list)

  • This is on IBM's list of requirements.
  • I added a table to the Table View, I can see all my fields, but can't copy and paste from there.
  • Drag and drop from table view to RS LPEX is currently not available.
  • You can always open the DDS source and copy the names from there. Be sure to have a look at the rectangle select - it may come in handy for this (alt-r, alt-c.)

Error-messages are still showing in the edit view

  • After compiling, getting errors, and fixing them, and recompiling successfully, the error-messages are still showing in the edit view.
  • How to get rid of them with out closing the member
  1. Ctrl+F5,
  2. or either Source>Remove Errors,
  3. or Source>Refresh.
  • Its on IBM's list of requirements to automatically remove these during error list reloads.
  • Remove messages from the source by choosing SOURCE/Remove Messages from the top of the screen.
  • While you have theError List window open,
  1. click on the triangle in the top right corner of the window,
  2. choose Show Severity
  3. and uncheck Information to not show informational messages.
  • From the same menu,
  1. click Messages,
  2. choose Insert Selected Only.

This will only insert the message you click on from the Error List Window into the source, and will remove the previous error message when you choose another from the Error List Window.

Click the X icon in the top left part of the iSeries Error List view. (Note: This closes the error list view, but does not clear any errors inserted in the editor window. However, it is important to remember that the errors are not made a part of the source itself. They are simply shown in the LPEx editor window.)

The outline view of the RPG (or other) program doesn't show the fields TEXT.

The outline view of the RPG (or other) program doesn't have any way to show the TEXT associated with the field in a file, but you can easily open the Field Table View that does.

  • This will open the iSeries Field Table View which gives all the field information.
  1. Right-click on the line with the F-spec
  2. Select the Show fields menu option.


  • To show the properties of fields in files.
  1. Right click on a physical file object in RSE tree view
  2. and select show in table -> fields.


  • If you are using 7.0, you are also able to bring up a Field Table View by highlighting any (PF, LF, DSPF, etc...) file in an RPG program's F-Specs then select Source->Show Fields from the Menu Bar.
  • The above tips only work if the file is externally described in the F specification.

Where can I find a list of enhancements in V7?

You can find the list here: [2]

How do you work through learning the functionality of this application?

  • Currently I'm just stumbling through the basics, and I know I'm not doing many things the most productive way.
  • I recommend that you try the tutorials included in the product as well as the PDM/SEU transition to RSE/LPEX - which was revamped and rewritten for v7.0.
  • Also, if you go to the WDSC web site [3] and search the support section - you will find additional tutorials and the labs from COMMON.
  • Don Nitke has a site with a bunch of tutorials at [4]
  • Joe Pluta adds:

You can use the help and tutorials from within the product itself. There are some free tutorials out on the web, including my own first one. You can buy my book, WDSC: Step by Step, which is based on version 5.1.2, but still pretty valid. You can buy my training course from Rochester Initiative which is now available for version 7.

  • You can go to a jumpstart at a technical conference, or an all-day standalone seminar sponsored by your local user group.
  • Or you can contract with someone to come onsite and provide training.

I have these strange square symbols in my code.

When you are in RS LPEX, right-click and select Source>Hex Edit line, you will then see the hex value in the iSeries codepage, along with the client codepage.

Also, you can put the cursor on the square, press ESC (to move to the command line) and type "query hex". The "set hex 84" command will set the current cursor position to hex 84 (which turns on 'underline' for the SEU display).

  • Examples of hex codes you can use with "set hex"
    • 80 Normal
    • 81 Inverse
    • 82 White
    • 83 Inverse White
    • 84 Underline
    • 88 Red

How do I shift a block of text left/right?

Select the block of text by putting the cursor on the upper left corner of the block.

Press Alt-R.  
Move the cursor to the lower left corner.  
Press Alt-R again.  
Do NOT use Windows copy/paste (ctrl-c/x/v)  
You now have a block of text selected.  
  • An alternate way to select is
Alt-L (line) 
and then hold down the Shift key while using the cursor keys to continue highlighting lines.
  • You can also Alt-L on the first and last lines of the block.

You can shift it left/right with alt-f7/alt-f8 If you remap the keys, the action is blockShiftLeft and blockShiftRight

  • You can shift it via the menu Edit, Selected>Shift selection
  • You can uppercase or lowercase it with alt-k/alt-i or via the menu
  • You can move it: position the cursor where you want the upper left corner to end up and press alt-m or use the menu
  • You can copy it with alt-c
  • You can delete it with alt-d

Remember that Alt-U de-selects the block.

  • Note the following will shift the entire line of code, not just a section or block.
You can use SEU mode line commands LL and RR typed over the sequence number area.
LLnn will shift left nn columns.

Vertical line in WDSCI editor

Select Window/Preferences/LPEX Editor/User commands

  • Click on the drop down arrow in Class Name box,
  • select com.ibm.lpex.samples.HairlineCommand
  • Click Set apply OK
  • Then in the LPEX command line I enter
  • 'hairline cursor' or 'hairline off', to turn on and off.

Run a program on your PC

There are several programs that come with System i Access for Windows that can be interesting to use, but you can run other programs on your PC too. Those programs are wrksplf, wrkmsg, wrkprt and wrkusrj They are found in the System i Access program folder. On my default install, that is C:\Program Files\IBM\Client Access To register one of these programs in WDSC 7.0.0.x, take the following steps:

  • Run (from the menu.)
  • External Tools and then select (again) External Tools.
  • Click on the Program config once to select it.
  • Click on the New Launch Config icon on the far left (the one with the plus sign) at the top of the panel.
    • In the Main tab:
      • In the Name box I entered the name of the .exe (e.g. Wrksplf)
      • In 'Location' click 'browse file system' and drill to the exe in the IBM Client access folder and select the exe.
      • In 'Working Directory', copy & paste the path and strip off the final slash and the name of the .exe
    • In the Common tab:
      • In the middle, Display in favorites menu, select 'External Tools' and the new application will show up under Run->External tools
    • Click apply, then run to test. Close the app.

When you select Run->External Tools again it should appear at the top of the context menu. You can change the order they appear on the Run->External Tools context menu by using Run->External Tools->Organize favorites

Auto Marking Changes to the Source

Select Window|Preferences|Remote Systems|LPEX Editor Parsers

  • Check the box with text 'Add signature to changed lines'
  • and enter your Change number in the Signature box.
  • Click OK

Now whenever you change a line of source code, the 'signature' will be placed in pos 1-5 of the source line.

WDSCi vs SEU F15=Browse options

  • The method most analogous to the SEU F15 browse is Ctrl-2 to split view,
click on subroutine name in Outline View to position the new view to the subroutine, 
do whatever, 
Ctrl-0 to close the second view.  

Note that new views opened this way can all allow editing, and you can have up to 5 views open on a single member, not just 2 as in SEU.

  • Alternately,
just go to the subroutine by clicking on it in the Outline View, 
do whatever, 
then return to the Exsr by clicking on the line number where the subroutine is used.
  • A third way is to set a quick mark and return to it.
  • A fourth way is to set a named mark and return to it.
  • A fifth way (but the Outline View is easier) is to filter the source by the subroutine name
(either Ctrl-F, enter name, click All, or right click, Selected, Filter selected, 
which can also be set up as a key combo if you like), 
put the cursor on the Exsr or Begsr as you choose, and then Ctrl-W.

Note: If you have 6.0.0.1, you're too far behind - I believe you need 6.0.1.0 or higher to be able to open multiple views on the same member.


RPG source was not being saved

  • A RPG source was not being saved to my source file.

I can see the changes in WDSCi but not in the Iseries source.

  • Another symptom is when debugging I need to select the Listing View as the debugger is finding some old source for the *SOURCE view.
  • I cleared the File Cache and the debug cache.
  • I discovered a work around.
Say the member is PGM001, I renamed it (via WDSCI by right-click on the source and Rename)
to PGM001X, do my changes and save them.  Then I rename the member back to PGM001.
  • But the real problem was in Iseries Projects.
I had previously saved this source in a Project so that I could do work on my home PC. 
When I deleted the member from the Window/Open Perspective/Iseries Project view all worked
as expected.

Downloading source to PC to work offline

  • Select all the members that you want to download,
  • right click,
  • select Make available offline.
  • Select Yes to the next dialog box.

WDSC will download all the selected members to a iSeries project (named in my version as the CONNECTIONNAME_WINUSERNAME).

  • You can also travel with this project by exporting it,
  • right click on project name and selecting Export.
  • Then select Project Interchange,check off your project,
  • name a zip file to store it in, click finish.

You can then put the zip on a mem-stick and take it home (if that's what you want to do with your time off). Be aware of the issue with Iseries Projects in the 'RPG source was not being saved' tip.

To show dates for source lines:

  • 1. Open source in LPEX
  • 2. Right click on the source pane, select SOURCE, then SHOW DATE AREA.

To filter source line by date:

  • 1. Open source in LPEX
  • 2. Right click on the source pane, select FILTER VIEW, then DATE.
  • 3. Enter the date (or range) and selection criteria on the popup.

To Print RPG Indented Source

  • You can print using the command line below the editor window
  • press Esc when you are in the source. Or just click in it.
  • Type ? print - you will see all the options.
  • To get the entire source use
print tokenized off lineNumbers off
  • To print only what you've selected, use
print block tokenized off lineNumbers off
  • If you want line numbers and/or shading of elements, make the obvious changes.
  • The print command works even if the File->Print option is disabled - as it is for indented source.

SQLRPGLE Compiles how to find Compile errors

  • First turn off Batch compiles (see compile Interactively tip)
  • Next select Compile(Prompt) to see the compile Parms
  • Select CRTSQLRPGI
  • Click All Parameters checkbox.
  • Set the 'To source file parm to QSQLSRC in 'your lib' NOT QTEMP.

The compile will retreive the EVENTS file and show messages in the Iseries Error list View. You can click on the error and the source will be displayed with the cursor positioned on the error, but be careful as to what source member is in the 'Location' column of the Iseries Error List view. If the QSQLSRC member is listed you need to open the 'real' source to the same position to do the appropriate correction.

Within RSE, how to compile Interactively versus Batch

  • Window -> Preferences
  • Remote Systems -> iSeries -> Command execution
There is a compile in batch check box.  Uncheck that because the 
compile still draws from the Batch CPW of the server.

Prevent Enter generating a new line

  • Window/Preferences/LPEX Editor/User Key actions
  • Map Enter to action 'home' or 'end'

RSEF1002E Error

Operation failed. File system input or output error.

  • Exit WDSCi and reboot your PC.
  • I changed my password recently. For some reason my password got disabled. Also my Netserver password was disabled. (see Disabled User IDs in Netserver via Navigator.)
  • I reset my password, had my Netserver ID enabled and rebooted, all was OK.

SQL result set only contains 50 rows

You need to open the Data View to enable this preference. Preference setting under

  • Data/Sql Query that lets you specify the maximum number of rows to return,
  • as well as maximum bytes to retrieve for large columns.
  • The default max number of rows is 50.
  • Get V7 if you can.

Scan for a date when source lines were changed (like F14 in SEU)

  • You could issue the "locate sequenceText" command (in the command line at the case of the RSE editor or press ESC to enable command line), then invoke it repeatedly from the LPEX command line (UP arrow key, Enter).
  • example locate sequenceText 071201 to 071231
  • You can filter by date. Right-click in the source and you can filter by date.

Locate is an Editor command (ref Editor Commands tip)

Editor Commands

  • Type ?Editor on the command line
  • Click on 'Default editor commands' to see the commands
  • Click on the command for more info, including usage
  1. Note the Short Commands (see following small extract from the text)
/text Find the next occurrence of the specified text. 
-/text Find the specified text searching backwards from the current position. 
'text Find the next occurrence of the specified text.  The search is a case-sensitive search. 
-'text Find the specified text searching backwards from the current position.  The search is a case-sensitive search. 

(there is more info in the help text)

See SQL HOST variables in OUTLINE view. (is not possible)

  • I've long wished that SQL host variables would be part of the outline.
  • And file references in SQL statements - they CAN be parsed, after all, otherwise they could never be run by the system.
  • So it is not impossible, just not in scope, it seems.

Custom Compile Commands

  • In order to have WDSC automatically bring up the compile error list when you are using custom compile commands,
  • add /* OPTION(*EVENTF) SRCMBR(&N) */ to the end of your compile command. This tells WDSC that the command being executed is a compile command.

How to get the error list back into WDSC

  • Make sure that you are setting a *CURLIB. This is very important, because that's how the UI finds the EVFEVENT file generated by the compiler.

Technote 1231854 from ibm.com describes the official IBM help on the subject.

Debug and SEP Service entry prints

There is a detailed entry here Service Entry Point

Return to Top. WDSC tips

External links

The official WDSC web page [5]

The WDSC Developer blog [6]

WDSC tags on del.ici.ous [7]

Categories