Developers have created new subprograms that will be sending data to webMethods. The PDAs for the subprogram, as well as the “listeners”, were generated by webMethods; the PDA contains DYNAMIC variables. However, the VERY OLD programs that will CALLNAT to the subprogram(s) are strictly report mode programs/subprograms (no DEFINE DATA LOCAL statements). Therefore, they need to add the layout of the PDAs that will be used to CALLNAT the listeners into the report mode programs. If we add a ‘DEFINE DATA LOCAL USING …’ statement to the calling program, then NATURAL enforces the rule that ALL program variables must be in the DEFINE DATA. Some of these programs have literally hundreds of variables (in Report Mode) that are defined “on the fly”. How to get around this?? How to define DYnAMIC variables in Report Mode??
Steve,
One possibility is to create a subprogram to sit between the very old programs and the new subprogram. The middle-ware subprogram could have simpler parameters that could be added to your report mode programs and local data that has the dynamic variables needed by the new subprogram. There would be limitations of course.
The better option is to bite the bullet and convert the report mode programs, but we do what we can.
Green-screen editor can still do this:
Local Library YYYYYY
Command
I T L Name
All -- -----------------------------
. i( reportmd)
where “reportmd” is a reporting mode program of great complexity:
RESET #A(A50)
#B (I2)
#C (A20)
*
READ (10) EMPLOYEES BY ISN
DISPLAY PERSONNEL-ID
LOOP
*
END
The .i(program) editor command pops up a selection dialog
Please select :
X All local variables and parameters
_ All local variables
_ Only internally defined local variables
_ All parameters
_ Only internally defined parameters
X All defined variables
_ Used variables only
_ Unused variables only
Mark your preference for variables to be included, press enter to see the variables inserted into your local data area:
Local Library YYYYYY DBID 274 FNR 25
Command > +
I T L Name F Length Miscellaneous
All -- -------------------------------- - ---------- ------------------------->
* /* INSERTED FROM REPORTMD
1 #A A 50
1 #B I 2
1 #C A 20
V 1 EMPLOYEES-VIEW EMPLOYEES
2 PERSONNEL-ID A 8
* /* END OF REPORTMD
Hope that helps!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.