Sorry the piece of code I sent to you before wont work.
Try this code,
To test this, create MONTH.txt file and that has to have the values like
JAN
FEB
..
..
DEC
Store this file under your apps directory and call that file in your fex.
-*SET &ECHO='ALL';
FILEDEF MONTHDAT DISK \\&servname\IBI\APPS\MONTH.TXT
-RUN
-**input
-SET &MON1='JUN';
-*changing the input corresponding to month.
-SET &SELMONTH=DECODE &MON1('JAN' '0' 'FEB' '1' 'MAR' '2' 'APR' '3' 'MAY' '4'
- 'JUN' '5' 'JUL' '6' 'AUG' '7' 'SEP' '8' 'OCT' '9' 'NOV' '10' 'DEC' '11');
-SET &STARTMON = 12 - EDIT(&SELMONTH);
-SET &CNT=0;
-SET &MONVAL='';
-CONTRD
-READ MONTHDAT &MON.A3
-IF &IORETURN NE 0 THEN GOTO ENDRD ELSE GOTO GETMON;
-GETMON
-IF &MON EQ &MON1 OR &CNT GT 0 THEN GOTO STARTONE ELSE GOTO STARTTWO;
-STARTONE
-SET &MONVAL&CNT.EVAL=&MON ;
-SET &CNT=&CNT+1;
-GOTO CONTRD;
-STARTTWO
-SET &MONVAL&STARTMON.EVAL=&MON;
-SET &STARTMON=&STARTMON+1;
-GOTO CONTRD;
-ENDRD
-SET &CNT=0;
-REPEAT MONVAL 12 TIMES
-TYPE &MONVAL&CNT.EVAL
-SET &CNT=&CNT+1;
-MONVAL
-EXIT
Run this code and you will get some idea.
If you want to put this code in to your program. All you have to do is,
your code
FILEDEF MONTHDAT DISK C:\WEBFOCUS71\IBI\APPS\MONTH.TXT
-RUN
-SET &MON1='JUN';
-SET &SELMONTH=DECODE &MON1('JAN' '0' 'FEB' '1' 'MAR' '2' 'APR' '3' 'MAY' '4'
- 'JUN' '5' 'JUL' '6' 'AUG' '7' 'SEP' '8' 'OCT' '9' 'NOV' '10' 'DEC' '11');
-SET &STARTMON = 12 - EDIT(&SELMONTH);
-SET &CNT=0;
-SET &MONVAL='';
-CONTRD
-READ MONTHDAT &MON.A3
-IF &IORETURN NE 0 THEN GOTO ENDRD ELSE GOTO GETMON;
-GETMON
-IF &MON EQ &MON1 OR &CNT GT 0 THEN GOTO STARTONE ELSE GOTO STARTTWO;
-STARTONE
-SET &MONVAL&CNT.EVAL=&MON ;
-SET &CNT=&CNT+1;
-GOTO CONTRD;
-STARTTWO
-SET &MONVAL&STARTMON.EVAL=&MON;
-SET &STARTMON=&STARTMON+1;
-GOTO CONTRD;
-ENDRD
SET LOOKGRAPH=BAR
SET GRID = ON
-* SET LOOKGRAPH=BAR
-* SET HAXIS = 985
-* SET VAXIS = 518
GRAPH FILE HLDXCMPL
SUM YR1_COUNT AS '&YR1'
YR2_COUNT AS '&YR2'
YR3_COUNT AS '&YR3'
ACROSS REC_COUNT
ON GRAPH SET GRAPHSTYLE *
setDataLabel(0,0, ?My New Group 0 Label?);
setGroupLabel(0,getDataLabel(0,0));
setDepthRadius(1);
setLegendMarkerPosition(4);
setO1LabelRotate(1);
setTitleString("Ridership Report");
setTextJustHoriz(getTitle(),1);
-SET &CNT=0;
-REPEAT MONVAL 12 TIMES
-*TYPE &MONVAL&CNT.EVAL
setSeriesLabel(&CNT,&MONVAL&CNT.EVAL)
-SET &CNT=&CNT+1;
-MONVAL
ENDSTYLE
END
Hope this helps,
WFConsultant
WF 8105M on Win7/Tomcat