Difference between revisions of "Snippets"
From MidrangeWiki
Line 36: | Line 36: | ||
original post [http://archive.midrange.com/wdsci-l/200602/msg00405.html] | original post [http://archive.midrange.com/wdsci-l/200602/msg00405.html] | ||
− | + | You can use the snippets to insert stuff into your program. | |
− | |||
− | |||
To create your own RPG snippets, | To create your own RPG snippets, | ||
Line 47: | Line 45: | ||
It will then create a new template. | It will then create a new template. | ||
− | + | To use the snippet; | |
− | + | *Open a source member for editing. | |
− | + | *Place the cursor where you want the code. | |
+ | *Go to the Snippets view, to the Category where the snippet is. | ||
+ | *Double click on the snippet and it appears in the source | ||
+ | |||
original post [http://archive.midrange.com/wdsci-l/200610/msg00505.html] | original post [http://archive.midrange.com/wdsci-l/200610/msg00505.html] | ||
− | Another method is. | + | Another method is to create a Snippet. |
1. Open the Snippets view. | 1. Open the Snippets view. |
Revision as of 10:20, 7 April 2008
Contents
SNIPPETS
Snippets View
original post [1]
To open a snippets view:
- Window -> Show view -> Other -> Basic -> Snippets
Return to #TOP
Create a Snippets Category
original post [2]
- You only need to create a Category once, conceptually its like CRTSRCPF.
- Create as many Categories as you wish.
- -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 that is adjacent to the Variables list
- -Enter your snippet and use the Insert Variable Placeholder button to add the variable
Use snippets for RPGLE, CLLE, DSPF and PRTF source members.
Return to #TOP
Snippets RPG
original post [3]
You can use the snippets to insert stuff into your program.
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.
To use the snippet;
- Open a source member for editing.
- Place the cursor where you want the code.
- Go to the Snippets view, to the Category where the snippet is.
- Double click on the snippet and it appears in the source
original post [4]
Another method is to create a Snippet.
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
External links
The official WDSC web page [5]
The WDSC Developer blog [6]
WDSC tags on del.ici.ous [7]