Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

Command Bindings Compiling code

Liam Allan edited this page Aug 11, 2017 · 7 revisions

With a bind, you can execute a compile command and then return errors for the compile. When you create a new configuration, there should be some predefined bindings for you.

  • To add a binding, click "Add bind"
  • To edit a binding, select the binding from the list and then click "Edit bind"
  • To delete a binding, select the bind and then use the delete key.
  • Double clicking on a binding will run the commands on the connected system and print the results on the Command Entry window.

Errors

CRTBNDRPG PGM(%openlib%/%openmbr%) SRCFILE(%openlib%/%openspf%) OPTION(*EVENTF) DBGVIEW(*SOURCE)
ERRORS %openlib% %openmbr%

A bind can execute any system command you would like. ERRORS is a command used by IBMiCmd to return the error listing for a certain object. For the errors to show up, you must have the Error Listing window open already.

ERRORS LIB OBJ
ERRORS MYLIBRARY MYPROGRAM
ERRORS %openlib% %openmbr%
ERRORS MYLIBRARY %file%

Variables

Binding also provides the ability to use 'variables'. Variables allow you make generic bindings, like a single binding to compile a program. These are the available bindings (always lowercase):

Generic bindings
  • %curlib% - current library
  • %user% - current user
  • %host% - current system
Values that work when a source member tab is open
  • %openlib% - source member's library - when compiling source members
  • %openspf% - source member's source physical file - when compiling source members
  • %openmbr% - source member's name - when compiling source members
Values that work when a IFS stream file tab is open (NppFTP)
  • %file% - Open file's name - for IFS files
  • %ext% - Open file's extension - for IFS files.