Russian Wyatt 2 Posted December 7, 2021 Posted December 7, 2021 I have the following code that reads from an table that has two columns in it Company name and FNAME (filename): -SET &I=0; -REPEAT Listing WHILE &I LT &LINES; -READFILE CompanyList - &CompanyName - &FNAME -INCLUDE companies.fex -SET &I = &I +1; -Listing Each time through the loop it pulls a row of data and passes it off to companies.fex where FNAME is used to open a specific excel file and process the data creating a table using the value in CompanyName My problem is when it gets to the next procedure instead of using the values in the variables, I get prompted to enter in. TABLE FILE &FNAME PRINT * ON TABLE HOLD AS &CompanyName FORMAT XFOCUS If I just check the values of the variables I see that the correct information has been passed throught. - &CompanyName - &FNAME Just and update: Im not sure why but with the exception of the prompting issue the program runs as expected. I can enter any value into the prompt and the program just ignores that input and uses the original data in the variable. Any suggestions
David Beagan Posted December 7, 2021 Posted December 7, 2021 You can code this in the beginning: -SET &CompanyName = ' '; -SET &FNAME = ' ' ; Also, the documentation says the Dialogue Manager commands must begin in column 1.
Warren Hinchliffe Posted December 8, 2021 Posted December 8, 2021 Ditto with @david.beagan, Hope the indenting is not in your code. Do you have a -RUN after the TABLE FILE in the INCLUDE Also, I assume your code is on the Reporting Server due to the -INCLUDE {fex} without a path.
Russian Wyatt 2 Posted December 8, 2021 Author Posted December 8, 2021 Thanks @david.beagan fixed the issue. I figured it was something simple that I was forgetting. I only get the following warnings and thats just fine. (FOC2906) WARNING: &CompanyName WILL BE OVERWRITTEN BY -READFILE CompanyList (FOC2906) WARNING: &FNAME WILL BE OVERWRITTEN BY -READFILE CompanyList As for the indenting, I do remember something about the commands must begin in column 1. I actually indented the code to make it easier to cut/paste into here, but after reading the above post I noticed that my code was still indented and ran the program. It had have no problems with executing the indented code, I have since removed the indentation just in case.
Martin Yergeau Posted December 8, 2021 Posted December 8, 2021 If you add the below after the -READFILE (I know, it seems weird to put it afterbut do it there), the warning should be removed -DEFAULTH &CompanyName = -DEFAULTH &FNAME =
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now