As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
If you have your "ears on", please can you perform an edit on the post to which Francis refers? Then we can all see the contents and the 5 (current) replies .
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Firstly, let me apologize for including some HTML in my original post that seems to have really screwed things up. I will not make that mistake again.
I thought I would repost my request here since I cannot seem to do anything with my original post including reading the replies.
We have been trying to fully implement MRE for a number of years without success.
So, out of desperation, I need to simulate something we bought MRE for... the ability to save FOCUS code to a user's PDS on the mainframe.
This may sound stupid, but I REALLY need to give the users, who would rather die than use the TED editor or ANY mainframe editor, the ability to create a save procedure on the mainframe.
WebFOCUS takes what is in the TEXTAREA and ships it up to the mainframe to be processed. The resulting output is either a report or an error page. If the code produces a report 'without' an error, we would like to give them ability to save the code on the mainframe.
I envision being able to pass the FOCUS TABLE syntax up to the mainframe then do -WRITE (perhaps with a loop) to create the FOCEXEC (RPC) in the user's personal library.
I do not have the html/javascript experience to know whether something like this is actually possible.
Some kind hearted members of the forum have sent me FOCUS logic. I really appreciate it, but we know what we need to do with FOCUS, but I believe it may be html/javascript we are struggling with. If we were to send a textarea up to the mainframe, how do we interrogate the variable and parse it? We know textarea works with IBIF_adhocfex. How do we get it to work with another named variable?
I do not care if they have to copy and paste the code from the adhoc page to another html page that would then ship and save the code.
Any help would be greatly appreciate!
Thanks in advance,
Harry
FOCUS 7.3.4 on Z/OS WebFOCUS/EDA 7.1.8 self-service - Win2003 and Z/OS
Thinking "on the hoof" and taking what you mentioned about a two pronged process (as near as).
How about setting a link in the header on the successful report labelled "Save Code" or something of the like, and then when the HREF is clicked, rerun the report with an additional parameter which reroutes the process flow to a focexec where a Users PDS is DYNAM ALLOC'd (with all the prerequisites) and then uses -WRITE to write the contents of the TEXTAREA into that PDS?
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Dumb question here. If you are MRE and they are creating reports, can they save them on the app server. Do you also have mainframe FOCUS and they want to run from a PDS there? Or is the save to a PDS just a back up purpose?
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Really quick: I seem to have difficulties on editing Harry's other topic. I am checking with Kathleen to see what we can do to help here. Sorry for any inconveniences.
To those who did reply to the other topic (https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3301068802), can you please re-post your message here? Your suggestions are very important and we want to see them. Thank you in advance for understanding.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
(Re-posted from the other thread that went bonkers!!) Harry : It is a tad bit tricky, but you should be able to write to the mainframe. We have an application that Allocates a Sequential Dataset on the mainframe, -WRITEs a JCL line-by-line in it and then does a DYNAM SUBMIT to submit the job.
Here are some excerpts that could help you : -*-*-*-* -*-*-*-* Allocation step -*-*-*-* -SET &USER=GETUSER('A8'); -SET &TMSTMP = EDIT(HHMMSS('A8'),99$99$99); -SET &DAY = EDIT(&DMY, $9$$$$); -SET &DSNHJCL = 'XXXPPS.SOSSRPT.' | &USER || '.JCL' || '.D' || &DAY || &TMSTMP ; -* DYNAM ALLOC DD MAILJCL DS &DSNHJCL - SPACE 5,15 TRKS CATLG RELEASE DIR 0 UNIT SYSDA - LRECL 80 RECFM FB BLKSIZE 800 STORCLAS XXXXX -RUN -*-*-*-*-*-*-*-*-*-*-* -*-*-*-* the -WRITE step -*-*-*-*-*-*-*-*-*-*-* -SET &COMMA=','; -WRITE MAILJCL //AAAAAAAA JOB 'A123'&COMMA -WRITE MAILJCL // 'EMAIL JCL'&COMMA -WRITE MAILJCL // MSGCLASS=X&COMMA -WRITE MAILJCL // CLASS=T,NOTIFY=&USER -WRITE MAILJCL /* -WRITE MAILJCL //* -WRITE MAILJCL //ISTP0001 EXEC ABCDEFG,PARM='F' -WRITE MAILJCL //* .....................AND SO ON............... ... please note that you cannot end the line with a hard ',' comma ... assign the ',' to a variable and use it instead ........ -RUN -* -CLOSE MAILJCL -RUN -* DYNAM FREE DD MAILJCL -* -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-** -* In your case Harry, you would be allocating and writing to a PDS and hopefully the same technique will work. Else you atleast have a PS to write to, and can be later copied to a PDS. Also, the text-entry box will be a long string. Parse it out to max-80 character strings before doing the WRITE. You could use the 'SUBSTR' u-w-s to accomplish it.
Hope that helps to atleast give you an idea.
Goooooooooood day !! Sandeep Mamidenna
------------------------------------------------------------------------------------------------- Blue Cross & Blue Shield of MS WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !!
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006
He's a sample HTML page that should help you progress further.
Basically the form submission is controlled by a button onclick event rather than using a submit button (type=submit).
The first part of the script identifies the object and "escapes" it - turns control characters into equivalents usable on the URL. Next the form is submitted and finally the controls contents are "unescaped" so that the user still has their original code.
The showvals fex that I have put in the IBIF_ex value just contains "-? &" so that I can see the variable values being passed over. You will see that each carriage return and line feed is escaped to "%0D%0A" which is the equivalent of "CHR$(13)CHR$(10)" or "vbcrlf" etc. etc. depending upon your programming language.
Good luck
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Yesteday, I decided to search the entire IBI directory on our server for IBIF_adhocfex. I browsed all of the files. It looks as though IBI does something under the covers to use this variable in a TEXTAREA. So, my thoughts on simply sending up a TEXTAREA to the mainframe to be processes was flawed due to my lack of experience.
From the code you sent, it appears that you are making an array of the TEXTAREA. The code did not work in Netscape. In IE, I see the variables being passed correctly in the URL but get a The page cannot be found message. With my limited javascript experience, I will continue to play with your code.
I guess, if I had to post this question on the Forum again, I would ask - "How do I send a multiline TEXTAREA to the server?"
I would have thought IBI would have developed a technigue for this.
Thanks for your ideas... it is leading me in the right direction even if I do not know how to get there.
FOCUS 7.3.4 on Z/OS WebFOCUS/EDA 7.1.8 self-service - Win2003 and Z/OS
Like a dog with a bone - this has got me thinking.
On the HTML page you could add an extra button that prompts the User for a file name. Then strip it to the first 8 non special characters (incl spaces).
Pass this as a variable to your focexec on the server and then filedef or dynam alloc - as your platform requires - and parse it to enable a write to the filedef'd file.
Here's a quick trial that did write to a folder on my documents folder. It uses defaults so you should be able to run this once you have found out a few things.
Find the value for FOCMODE on your platform using ? SET and looking for the value of MODE. Add or amend a label to include your platform's filedef requirements. I have added one for WINNT and others for VMS and OS390 (it used to be MODE = MVS I think - but it was a while ago) with some DYNAMs. You will need to change these as necessary.
I wanted to use STRREP throughout but for some reason I always got an error when trying to replace "%20" with " " - it complained about the space (parameter number 6). Ah well, any method I suppose.
Anyway, a piece of code that should be fairly transportable to play with
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thanks Tony for you ideas. I have given your suggestion consideration. Your idea would be good for small procedures; however, many of our execs are 50-100 lines long. The &er variable is not going to handle that.
Over the last few days, I have been teaching myself the javascript language. I have come up with something close (or so I thought until 5 minutes before leaving from work last night).
While testing the code (see below), I entered in nonsense characters without spaces and it worked fine. When I showed my manager he was impressed until he asked me to type in a complete sentence. When I did, I found the code only grabbed the first word of every line.
Here is the html code with the javascript (it may not be too good; however, remember, I just started teaching myself this stuff):
<HTML>
<HEAD> <TITLE> New Document </TITLE>
<SCRIPT Language = JavaScript>
function showit() { //Store each line of textarea as array element var textArr = document.getElementById("WFid").value.split("\r"); var textLen = document.getElementById("WFid").value.length; str = " "; for (i = 0; i < 10; i++) { if (textArr[i] == null) { // document.write("Null value" + i) } else { str = "<INPUT TYPE=hidden NAME=W" + i + " VALUE=" + textArr[i] + "> <br> \r" d.writeln(str) } } }
function WFpage() { runWindow=open("","runWindow","resizable=yes,status,width=800,height=600"); d = runWindow.document d.writeln("<HTML>"); d.writeln("<form action='/ibi_apps/WFServlet' method='POST'>"); d.writeln("Press Run to save code:<br>");
After the user enters the text in the textarea, they click on the Run button which kicks off the WFpage function. This function builds another html page and will put each line of the textarea into a separate variable with the following code:
This code produces 3 variables (&W0, &W1 and &W2):
<INPUT TYPE=hidden NAME=W0 VALUE=TEST1> <br>
<INPUT TYPE=hidden NAME=W1 VALUE= TEST2> <br>
<INPUT TYPE=hidden NAME=W2 VALUE= TEST3> <br>
Please note how the &W0 INPUT line has been generated; then note how the next two are generated. Because of my lack of understanding of javascript, I do not know why it is splitting.
The real pain is not being able to put spaces between the word.
I have tried putting the VALUE= text in double quotes with \":
Because of my lack of experience, I do not know whether this venture in code is as foolish as searching for the Holy Grail; however, I would have expected IBI to have come across the need to send an entire textarea to a server to be parsed. Well, they do it with the IBIF_adhocfex variable. Unfortunately, this variable does not appear when one does a '-? &'. I have tried to follow the java code IBI uses for this variable; however, my lack of experience prevents me from fully understanding what is going on.
Maybe, if someone from IBI reads this, they will take pity on an old, beat up coder and give me some idea how to do this. The only reason I started this foolish venture is due to our users need to save code on our mainframe without having to sign on to the box and use what they thing are ancient editors. We had expected to have MRE installed in a production environment; however, that is not going to happen any time soon.
My thanks again for all those who have responded!
Harry
FOCUS 7.3.4 on Z/OS WebFOCUS/EDA 7.1.8 self-service - Win2003 and Z/OS