First off I want to thank those who responded to my earlier question regarding counts.
Secondly I have read the documentation regarding my next issue and I know that it says that parameters do not get passed with -INCLUDE. However the desired result is to get the values in the print statement below to be passed to a second fex. I would prefer to do this because we are trying to standardize our prompts for the workgroup that we are in and maintain some consistency and be able to reuse an "external procedure". So Im trying to pass the values from my statement below to a separate fex.
This may not work and if it does not I am willing to creatively explore other possiblities. Hoswever I would like to preserve if possible the idea of having this data creation external to the fex producing the actual results so that we can reuse.
My first attempt was using -INCLUDE and it did prompt me, however I would like to use the 'TERMNOW' TERMYRAGO and TERMYRAGO2 against the TERM from my data source so that i can do 2 year comparisons aginst last year and 2 years ago. I will have to do dates also but, i figure If i can get the terms to work I can get the dates to work also following the same logic.
Im sure its something simple that someone else has done before, but I often get pulled off projects like this to create a new report and then have to backtreack to where I began. A little guidance goes a long way.
geoff
DEFINE FILE SUBTERM TERMCHAR/A9=EDIT(SUBTERM.SEG01.STVTERM_CODE, '9999$$'); TERM/A9=EDIT(SUBTERM.SEG01.STVTERM_CODE, '$$$$99'); TERM_YR/I9=EDIT(TERMCHAR); TERM_YR_INT/I9=TERM_YR - 1; TERM_YR_INT2/I9=TERM_YR - 2; TERM_YR_MIN1/A9=EDIT(TERM_YR_INT); TERMCALC/A18=TERM_YR_MIN1 || TERM; TERM_YR_MIN2/A9=EDIT(TERM_YR_INT2); TERMCALC2/A18=TERM_YR_MIN2 || TERM; TERMYRAGO/A9=TRIM('L', TERMCALC, 12, '0', 6, TERMYRAGO); TERMYRAGO2/A9=TRIM('L', TERMCALC2, 12, '0', 6, TERMYRAGO2); TODAY/YYMD=&YYMD; YRAGOTODY/YYMD=DATEADD(TODAY, 'Y', -1); MTAGOTODY/YYMD=DATEADD(TODAY, 'M', -1); 2YRAGOTDY/YYMD=DATEADD(TODAY, 'Y', -2); END TABLE FILE SUBTERM PRINT SUBTERM.SEG01.STVTERM_CODE AS 'TERMNOW' SUBTERM.SEG01.TERMYRAGO SUBTERM.SEG01.TERMYRAGO2 TODAY MTAGOTODY YRAGOTODY 2YRAGOTDY WHERE SUBTERM.SEG01.STVTERM_CODE EQ '&STVTERM_CODE.(FIND SUBTERM.SEG01.STVTERM_CODE,SUBTERM.SEG01.STVTERM_CODE IN subterm).Pick Term.'; ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ ENDSTYLE END
If you use -INCLUDE to run another FEX then all $ variables remain active. You do not need to pass anything.
If you use EXEC to run the other FEX then you need to pass the specific & values you want to be avaialb le in the called FEX.
May 23, 2013, 04:42 PM
susannah
you're trying to save the value the user selects from his/her 'Pick Term', and pass that on, is that right? typically we write our fex on the car file or on ggsales or some file we can all understand , then replicate your issue. What Adelaide says is, of course, dead right. but your actual question is still a mystery, as you have only 1 &var and no visible -INCLUDEs
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 23, 2013, 09:59 PM
DBADiaz
You can use the -PROMPT DM function, and change your TABLE request accordingly
-PROMPT &VAR1.(FIND COUNTRY IN CAR).Pick a country.
-PROMPT &VAR2.(FIND BODYTYPE IN CAR).Pick a body type.
TABLE FILE CAR
PRINT CAR MODEL
BY COUNTRY
WHERE COUNTRY EQ '&VAR1';
WHERE BODYTYPE EQ '&VAR2';
END
You could make a fex that has the -PROMPT and include it on as many other fexes that need those variables.
Now if you need to drill down from the report, that is a different subject.This message has been edited. Last edited by: DBADiaz,
ah TABLE FILE CAR PRINT COUNTRY IF COUNTRY IS 'ENGLAND' IF RECORDLIMIT IS 1 ON TABLE SAVE [or ON TABLE HOLD FORMAT ALPHA] END -RUN -READ SAVE &MYTHING.A10
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID