Skip to content

Instantly share code, notes, and snippets.

@Dreller
Last active April 13, 2020 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dreller/8fce9cc4dc531f72748d30aef8f532e4 to your computer and use it in GitHub Desktop.
Save Dreller/8fce9cc4dc531f72748d30aef8f532e4 to your computer and use it in GitHub Desktop.
VOC: Quickly compile the same program
PA
* This paragraph will compile a program and propose to run it.
* Author: dreller2034, Apr 13 2020.
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Change the @PGMLIB to set the file which contains the program source.
SET @PGMLIB "DEVCORE.PGM"
* Change the @PGMNAME to set the program file to compile.
SET @PGMNAME "DC.CREATE.FILE.SUBR"
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CLR
DISPLAY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DISPLAY C O M P I L E R
DISPLAY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DISPLAY User : <<@LOGNAME>>
DISPLAY Library: <<@PGMLIB>>
DISPLAY Program: <<@PGMNAME>>
DISPLAY Account: <<@ACCOUNT>>
DISPLAY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DISPLAY
BASIC <<@PGMLIB>> <<@PGMNAME>>
IF <<@SYSTEM.RETURN.CODE>> EQ 1 THEN GO 500
DISPLAY
DISPLAY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DISPLAY * Failed to compile *
STOP
500:
DISPLAY
DISPLAY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IF <<I3,Run program (Y/N) ?>> # "Y" THEN STOP
CLR
RUN <<@PGMLIB>> <<@PGMNAME>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment