skip to main content

Library Routines : WD2$REDIRECT

WD2$REDIRECT
The WD2$REDIRECT library routine redirects the browser to a new page or resource. It can be used only in Web Direct 2.0 environment.
Note - if you use this routine to redirect the browser to a file created by the COBOL program (e.g. a PDF printed by the program) and you wish to specify a relative path to the file in your JavaScript, be aware that the relative path for the JavaScript doesn’t always match with the relative path used by the COBOL program. When you run your programs from the IDE the relative paths match between COBOL program and JavaScript. Instead, when you deploy your programs in a servlet container (e.g. Tomcat), JavaScript appends the relative path to the webapp main folder while the COBOL program appends them to the servlet container working directory.
Syntax:
 CALL "WD2$REDIRECT" USING newURL
Parameters:
framename (the name o a frame in a frameset).
Return code:
Examples:
Example - Redirect to the Veryant’s web site
call "wd2$redirect" using "http://www.veryant.com" "_self"

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left