Created
October 4, 2012 18:09
-
-
Save AndrewTheTM/3835351 to your computer and use it in GitHub Desktop.
Cube Script to Write Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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