Difference between revisions of "Snippets"

From MidrangeWiki
Jump to: navigation, search
(Some reformatting)
Line 12: Line 12:
 
snippets.
 
snippets.
  
To create your own RPG snippets, you can open the view in RSE or iSeries  
+
To create your own RPG snippets,  
Editing perspective, select your source, and right click / Past in the  
+
*you can open the view in RSE or iSeries Editing perspective,  
snippets view.  It will then create a new template.
+
*select your source,  
 +
*and right click / Past in the snippets view.   
  
As a side question to the IBM'ers: how can I enable the snippets (or any
+
It will then create a new template.
other) view in WDSC Lite?  In the full-blown version it's under Basic, but
 
in Lite it's not there to select.
 
  
 +
As a side question to the IBM'ers: how can I enable the snippets (or any other) view in WDSC Lite? 
 +
In the full-blown version it's under Basic, but in Lite it's not there to select.
 +
 +
 +
original post [http://archive.midrange.com/wdsci-l/200610/msg00505.html]
 +
 +
Another method is.
 +
 +
1.  Open the Snippets view.
 +
2.  Create a new 'Drawer' for your snippets.
 +
3.  Copy some source.
 +
4.  Right-click in your snippet drawer, paste.
 +
5.  This will bring up the snippet creation wizard.
  
 
Return to [[#TOP]]
 
Return to [[#TOP]]
Line 27: Line 39:
 
original post [http://archive.midrange.com/wdsci-l/200707/msg00091.html]
 
original post [http://archive.midrange.com/wdsci-l/200707/msg00091.html]
  
I use snippets for RPGLE, CLLE, DSPF and PRTF source members. I am
+
Use snippets for RPGLE, CLLE, DSPF and PRTF source members.  
currently using version 7 but I started with snippets in version 6.
+
 
 +
version 7  
  
-Right-click in the Snippets view and select Customize
+
-Right-click in the Snippets view and select Customize
-Click the New button and create a new category
+
-Click the New button and create a new category
-Click the New button and create a new snippet
+
-Click the New button and create a new snippet
-Click on the snippet and then click the New button adjacent the
+
-Click on the snippet and then click the New button adjacent the Variables list
Variables list
+
-Enter your snippet and use the Insert Variable Placeholder button to add the variable
-Enter your snippet and use the Insert Variable Placeholder button to
 
add the variable
 
  
 
Return to [[#TOP]]
 
Return to [[#TOP]]
Line 45: Line 56:
  
 
To open a snippets view:
 
To open a snippets view:
Window>Show view>Other>General>Snippets
+
Window -> Show view -> Other -> General -> Snippets
 
 
Return to [[#TOP]]
 
 
 
 
 
===WDSC snippets for ILE/RPG===
 
 
 
original post [http://archive.midrange.com/wdsci-l/200610/msg00505.html]
 
 
 
 
 
I've managed to create snippets, but I'm not familiar with how they
 
normally work, so not sure how much more awkward than normal my method is.
 
 
 
1.  Open the Snippets view.
 
2.  Create a new 'Drawer' for your snippets.
 
3.  Copy some source.
 
4.  Right-click in your snippet drawer, paste.
 
5.  This will bring up the snippet creation wizard.
 
  
 
Return to [[#TOP]]
 
Return to [[#TOP]]
 
  
  

Revision as of 00:03, 13 March 2008


SNIPPETS

Snippets RPG

original post [1]

I noticed that you can use the snippets to insert stuff into your program, even though you cannot select parts of your source and add it to the snippets.

To create your own RPG snippets,

  • you can open the view in RSE or iSeries Editing perspective,
  • select your source,
  • and right click / Past in the snippets view.

It will then create a new template.

As a side question to the IBM'ers: how can I enable the snippets (or any other) view in WDSC Lite?  
In the full-blown version it's under Basic, but in Lite it's not there to select.


original post [2]

Another method is.

1.  Open the Snippets view.
2.  Create a new 'Drawer' for your snippets.
3.  Copy some source.
4.  Right-click in your snippet drawer, paste.
5.  This will bring up the snippet creation wizard.

Return to #TOP

Open Snippets View

original post [3]

Use snippets for RPGLE, CLLE, DSPF and PRTF source members.

version 7

-Right-click in the Snippets view and select Customize
-Click the New button and create a new category
-Click the New button and create a new snippet
-Click on the snippet and then click the New button adjacent the Variables list
-Enter your snippet and use the Insert Variable Placeholder button to add the variable

Return to #TOP

Snippets View

original post [4]

To open a snippets view:

Window -> Show view -> Other -> General -> Snippets

Return to #TOP


External links

The official WDSC web page [5]

The WDSC Developer blog [6]

WDSC tags on del.ici.ous [7]

Categories