Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert ISPF panel to HTML or Windows 1

Status
Not open for further replies.

mikerexx

MIS
Aug 4, 2009
23
0
0
US
I have some rexx programs that are stored on an IBM mainframe. These use ISPF panels as the user interface. I want to use the programs in a windows or Web environment. So, I need to convert the ISPF panels to HTML or something that will display on a PC. Does anyone know how to do this in an automated fashion?
 
Write a rexx program or use SPF/Pro on the PC - do NOT use SPF/SE.

I do not know of any utility that can do it.
 
I ignore SPF/SE because it does not use Rexx. But whichever version you use there are inconsistencies between ISPF and SPF/Pro - not serious but conversion is needed.
 
I have an older version of SPF/SE from Command Technology and it doesn't use REXX for macros, but a C like language.
For example Kedit is the editor which uses REXX for macros.

But when your REXX programs are not editor macros, you can try to port them for windows platform using any REXX interpreter for windows. But I doubt that you can convert the panels into windows GUI, you probably need to reprogram all user interfaces.
 
Mikrom, Thanks. I have downloaded oorexx that I can use in the windows env - copy my MF stuff to it and compile it or whatever using oorexx. I couldnt answer, though, the panel problem. I was afraid I was going to have to "reprogram" the panels. Maybe its just me but, it seems like there is a market for ispf panel conversion software.
 
it seems like there is a market for ispf panel conversion software.
Looks like you've found something to do with your spare time - say between 2 and 4 in the morning. . .<g>
 
Hey, if it will let me retire, why not. Im not an HTML or Windows guy though. And what do you do with the PROFILE variables? Looks like I will have to keep working... and sleeping from 2 to 4.
 
Just a note: SPF/Pro came BEFORE SPF/SE and it was the switch from Pro to SE when the builtin Rexx was converted to interpreted C.
 
Why not vb??? "

Im not interested in writing code to be writing code. Its in rexx on the mainframe using ispf for display. I can put the rexx code almost directly in oorexx on my pc. I just have the display problem to deal with. As I have indicated my preference is HTML or some way to display a web page.
 
Ispf panels are generated modules of compiled code; on the mainframe any panel can be duplicated using rexx source and do not compile, We tested this at Boeing and found the source was faster than compiled screens. Then you don't have to deal with recompile problems.
If you dont want to program how about FrontPage?? it would be simple enough.
 
lsil...
My panel is a popup; something like:

)ATTR
# TYPE(TEXT) COLOR...
!...
@...
)BODY WINDOW(70,20)
# FIELD NAME ==>
! FIELD NAME2 ==>
...
VPUT(...)
)END

How do I "duplicate using rexx source" for this?
 
Generally user panels are NOT compiled. Generally panels cannot be duplicated in Rexx. Rexx does not have the facility to paint a screen - you can only SAY on the next line and PULL from the line after and all in glorious green on black. Rexx cannot handle AID & PF Keys. On the PC you can get packages that will allow you to paint a screen but, so far, I have not been able to use them to successfully duplicate a panel.

OORexx does have interfaces to the Windows API so that one can generate screens in a Windows style. But I have not got around to trying that out.
 
Open Object REXX on Windows contains OODialog class library for creating GUIs. It requires OOP and seems to be suitable for creating challenging GUIs
- see the examples in your \ooRexx\samples\oodialog subdirectory
There are other GUI libraries available too - I personally want try REXX/Tk, but the last build is form 2002. Is it still supported or not?
And there are surely other options for GUI libraries, I don't know.

But on Windows there is other way I know - IMHO simpler:
ooRexx could be integrated into WSH (Windows Script Host), so you can use all GUI functions supported by windows native script languages: VBscript and Jscript.
This could be adequate for simple dialogs.
And you can script webpages with ooREXX too - at similar way as you do that with Jscript or VBscript.

Consider, I have a simple REXX program which only uses say for writing output and parse pull for reading input:

Hello_Rexx.rex
Code:
[COLOR=#0000ff]/* Main program */[/color]
[COLOR=#804040][b]say[/b][/color] [COLOR=#ff00ff]"Enter your name: "[/color]
[COLOR=#804040][b]parse pull[/b][/color] name
[COLOR=#804040][b]if[/b][/color] name [COLOR=#804040][b]\=[/b][/color] [COLOR=#ff00ff]""[/color][COLOR=#804040][b] then[/b][/color]
  [COLOR=#804040][b]say[/b][/color] [COLOR=#ff00ff]"Hello '"[/color][COLOR=#804040][b]||[/b][/color]name[COLOR=#804040][b]||[/b][/color][COLOR=#ff00ff]"' from REXX :-)"[/color]
[COLOR=#804040][b]else[/b][/color]
  [COLOR=#804040][b]say[/b][/color] [COLOR=#ff00ff]"Warning: Nothing given!"[/color]
[COLOR=#804040][b]exit[/b][/color]
The program does the following:
Code:
c:\Users\Roman\Work>Hello_Rexx.rex
Enter your name:
mikrom
Hello 'mikrom' from REXX :-)

c:\Users\Roman\Work>Hello_Rexx.rex
Enter your name:

Warning: Nothing given!
Now I want to create a GUI using VBscript functions msgbox() and inputbox().
Therefore I create a WSH script. In the WSH script I can combine several languages together (wich are supported by WSH) - it means for example, that I can write some temporary functions in VBscript (or Jscript, Python, Perl,...) and write the main program logic in REXX.
So, first I create a VBscript functions input_box() and msg_box(), which are only wrappers for native WSH or VBscript functions inputbox() and msgbox().
And then I use simply these VB-functions in my main program written in REXX, without need to rewrite the REXX logic into OOP classes..etc.

Hello_Rexx.wsf
Code:
[COLOR=#008080]<[/color][COLOR=#008080]job[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]id[/b][/color]=[COLOR=#ff00ff]"REXX_in_WSH"[/color][COLOR=#008080]>[/color]

[COLOR=#008080]<script language="VBScript">[/color]
[COLOR=#804040][b]function[/b][/color] input_box [COLOR=#804040][b]([/b][/color]prompt[COLOR=#804040][b],[/b][/color] title[COLOR=#804040][b])[/b][/color] 
  input_box [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]inputbox[/color][COLOR=#804040][b]([/b][/color]prompt[COLOR=#804040][b],[/b][/color] title[COLOR=#804040][b])[/b][/color]
[COLOR=#804040][b]end[/b][/color] [COLOR=#804040][b]function[/b][/color]

[COLOR=#804040][b]function[/b][/color] msg_box[COLOR=#804040][b]([/b][/color]prompt[COLOR=#804040][b],[/b][/color] buttons[COLOR=#804040][b],[/b][/color] title[COLOR=#804040][b])[/b][/color]
  msg_box [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]msgbox[/color] [COLOR=#804040][b]([/b][/color]prompt[COLOR=#804040][b],[/b][/color] buttons[COLOR=#804040][b],[/b][/color] title[COLOR=#804040][b])[/b][/color]
[COLOR=#804040][b]end[/b][/color] [COLOR=#804040][b]function[/b][/color]
[COLOR=#008080]</script>[/color]

[COLOR=#008080]<[/color][COLOR=#008080]script[/color][COLOR=#008080] [/color][COLOR=#2e8b57][b]language[/b][/color]=[COLOR=#ff00ff]"Object Rexx"[/color][COLOR=#008080]>[/color]
/*---------- msgbox buttons argument constants --------------------*/
vbOKOnly  = 0          /* Display OK button only*/
vbOKCancel = 1         /* Display OK and Cancel buttons */
vbAbortRetryIgnore = 2 /* Display Abort, Retry, and Ignore buttons */
vbYesNoCancel = 3      /* Display Yes, No, and Cancel buttons */
vbYesNo = 4            /* Display Yes and No buttons */
vbRetryCancel = 5      /* Display Retry and Cancel buttons */
vbCritical = 16        /* Display Critical Message icon */ 
vbQuestion = 32        /* Display Warning Query icon */
vbExclamation = 48     /* Display Warning Message icon */
vbInformation = 64     /* Display Information Message icon */
vbDefaultButton1 = 0   /* First button is default */
vbDefaultButton2 = 256 /* Second button is default */
vbDefaultButton3 = 512 /* Third button is default */
vbDefaultButton4 = 768 /* Fourth button is default */
/* Application modal; the user must respond to the message box 
   before continuing work in the current application */
vbApplicationModal = 0 
/* System modal; all applications are suspended until the user responds 
   to the message box */
vbSystemModal = 4096
/*---------- msgbox return value constants ------------------------*/
VBOK = 1     /* OK */
VBCancel = 2  /* Cancel */
VBAbort = 3  /* Abort */
VBRetry = 4  /* Retry **/
VBIgnore = 5 /*Ignore */
VBYes = 6    /* Yes */
VBNo = 7     /* No */ 
/*-----------------------------------------------------------------*/

/* Main program */
prompt = "Enter your name: "
title = "Input Panel"
name = input_box(prompt, title)
say "name = '"||name||"'"
select 
  when name = .nil then do
    /* 'The NIL object' */
    message = "Program was canceled!"
    rc = msg_box(message, vbExclamation, "Warning Panel")
  end
  when  name \= "" then do
    prompt = "Hello '"||name||"' from WSH with Open Object Rexx :-)"
    rc = msg_box(prompt, vbInformation, "Output panel")
  end
  otherwise do
    message = "Warning: Nothing given!"
    rc = msg_box(message, vbCritical, "Warning Panel")
  end
end /*select*/
[COLOR=#008080]</script>[/color]

[COLOR=#008080]</job>[/color]

You can run the script simply by double clicking the Hello_Rexx.wsf file or if you want to see the hidden says for debugging purposes, then you can use cscript from command line:
Code:
c:\Users\Roman\Work>cscript /nologo Hello_Rexx.wsf
name = 'mikrom'

c:\Users\Roman\Work>cscript /nologo Hello_Rexx.wsf
name = ''

c:\Users\Roman\Work>cscript /nologo Hello_Rexx.wsf
name = 'The NIL object'


 
lsilvenis : I cannot see anywhere that I say that Rexx can generate ISPF panels. Using ISPF services it can display them but not generate them (although you can include the source for a panel within the Rexx program).

As regards to emulating a panel it depends on how close an emulation - Rexx cannot write to different parts of the screen and allow you to enter data in various parts of the screen and then read it all when you press enter. It can, in a serial manner, issue prompts and pull the responses but that is hardly emulating in my vocabulary.
 
mikrom,
Thanks for the education. At this moment I am not at the machine on which I downloaded oorexx. I am not able to install oorexx on my daytime machine. But I tried the Hello_Rexx.wsf script anyway. I get a message that says:

"The value for the attribute is not valid : language"

I assume it is referring to:

"<script language="Object Rexx">"

Please keep in mind I am a mainframe guy - Im out of my comfort zone. Will this work on a machine on which I have oorexx installed? Does the above statement refer to the oorexx software?
 
Hi mikerexx,
You need first to install ooRexx at your machine, then the REXX-scripting in WSH will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top