Skip to content

Instantly share code, notes, and snippets.

@AndrewTheTM
Created October 4, 2012 18:09
Show Gist options
  • Save AndrewTheTM/3835351 to your computer and use it in GitHub Desktop.
Save AndrewTheTM/3835351 to your computer and use it in GitHub Desktop.
Cube Script to Write Script
RUN PGM=MATRIX
FILEO PRINTO="WrittenScript.S"
PAR ZONES=1
PRINT PRINTO=1 LIST="RUN PGM=MATRIX"
PRINT PRINTO=1 LIST="FILEO RECO=\"INPUT\DATABASE.DBF\" FIELDS="
LOOP i=1,30
_yr=2010+i
PRINT PRINTO=1 LIST="\YR",_yr(4.0L),"
IF(i < 30) PRINT PRINTO=1 LIST="\,"
ENDLOOP
PRINT PRINTO=1 LIST="PAR ZONES=1"
PRINT PRINTO=1 LIST="ARRAY array1=30"
LOOP i=1,30
_yr=2010+i
PRINT PRINTO=1 LIST="RO.YR",_yr(4.0L),"=array1[",i(3.0L),"]"
ENDLOOP
PRINT PRINTO=1 LIST="WRITE RECO=1"
PRINT PRINTO=1 LIST="END RUN"
END RUN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment