|
Rick, A couple of problems: 1. Is INT a valid description for a parameter? I thought they were limited to IN, OUT and INOUT. 2. You don't have datatypes and field lengths for your parms. I don't know if they are required for the program you're calling or not. I always use them for RPG and CL. 3. Don't put your %FUNCTION block inside your %HTML block. I don't know that they will work in there. The manual says the following about the context for %FUNCTIONs: Context The FUNCTION block can be found in these contexts: - IF block - Outside of any block or statement in the declaration part of the Net.Data macro. On 7/19/06, rick baird <rick.baird@xxxxxxxxx> wrote:
hey all,
I'm trying to get a DTW_DIRECTCALL function for net.data working, and
i'm having a dickens of a time. could someone check my syntax please?
the error I'm getting on the page is:
%function(DTW_DIRECTCALL) dc1( IN psession, OUT pstatus, INT pstore,
INT pfyear, INT pfper ) { %EXEC { IRTGETPARM.PGM NET.DATA Error: An
incorrect symbol (%}) was encountered at line 29 of file
/HTTP/WEBT/NETDATA/phy/irt/irtmenu.mac.
see the code below:
line 29 is the line directly after the %EXEC { IRTGETPARM.PGM %}
the cookie is being set, and it is also being retrieved, action and
session are being passed as url query string variables
I'm pulling my hair out here - been screwing around with this for about 3 hours.
Thanks!
----------
%include "inc.define"
%include "inc.runsql"
%html(main) {
%if($(action) == "new")
@DTW_SETCOOKIE("sns_irt_session_id", $(session), "expires=Friday,
10-Nov-2050 00:00:00;path=/")
%endif
@DTW_GETCOOKIE("sns_irt_session_id", psession)
%IF($(RETURN_CODE) == "8000")
<html>
<body>
<br><br>
IRT Session has not been established or has expired.<br><br>
Please close this window and restart the application.<br>
</body>
</html>
%ENDIF
%function(DTW_DIRECTCALL) dc1( IN psession,
OUT pstatus,
INT pstore,
INT pfyear,
INT pfper ) {
%EXEC { IRTGETPARM.PGM %}
%}
%IF($(PSTATUS) == "N")
<html>
<body>
<br><br>
IRT Session has not been established or has expired.<br><br>
Please close this window and restart the application.<br>
</body>
</html>
@DTW_EXIT()
%ENDIF
<html>
<head>
<title>$(IRTapp) - Main Menu</title>
<link rel="stylesheet" href="/phy/htm/style1.CSS" type="text/css">
</head>
<body>
...etc. etc.
------------
the include files are used elsewhere and don't have any errors.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.