User interactive C++ app



Help for C/C++ for MVS, OS/390 C/C++, z/OS C/C++ and C/C++ Productivity Tools for OS/390

User interactive C++ app

Postby Greenhouse » Mon Oct 18, 2010 1:25 pm

Hi all,

Can someone share example of typical source code of that kind of application?

I have no problem to write ISPF panels and REXX code to interact with them, but in C++ it's a different story.
Greenhouse
 
Posts: 25
Joined: Tue Sep 02, 2008 1:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: User interactive C++ app

Postby NicC » Mon Oct 18, 2010 2:59 pm

I am not clear on what you want to do. Do you want to write a C++/ISPF application? If so, does C++ have the ability to call an ISPF service? If it does then the relevant manual will have examples.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: User interactive C++ app

Postby enrico-sorichetti » Mon Oct 18, 2010 3:31 pm

ISPF does not have any C++ capabilities IIRC
but C is fully supported also the metal option
but in C++ it's a different story.

why it' s a different story ?
a programming language is a programming language,

to see the C syntax for using ISPF services open in EDIT an empty <thing>
type in the command line model and follow the instruction
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: User interactive C++ app

Postby enrico-sorichetti » Mon Oct 18, 2010 3:40 pm

cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: User interactive C++ app

Postby Greenhouse » Mon Oct 18, 2010 5:02 pm

NicC wrote:I am not clear on what you want to do. Do you want to write a C++/ISPF application? If so, does C++ have the ability to call an ISPF service? If it does then the relevant manual will have examples.


I want to write user interactive application in C++, just as i said.
C++ have ability to call an ISPF services as I understood from ISPF Services Guide.
Sample code of C++/ISPF program will help me a lot, especially how to get and set values of ISPF panel's variables.
Greenhouse
 
Posts: 25
Joined: Tue Sep 02, 2008 1:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: User interactive C++ app

Postby Robert Sample » Mon Oct 18, 2010 5:17 pm

I want to write user interactive application in C++, just as i said.
What, exactly, does this mean? A 3270 terminal session is not interactive -- there is nothing done by the computer until an attention key (such as enter, clear, PF or PA key -- although there are others) is hit. Unlike Windows, for example, where every keystroke is examined by the machine only the full screen of data is processed by a 3270 session. If you expect "interactive" to mean something like a Windows session then you need to either change your expectation or accept that "interactive" (in that sense) on a mainframe cannot be done.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: User interactive C++ app

Postby enrico-sorichetti » Mon Oct 18, 2010 5:17 pm

only rexx and clist have the automating passing of values
between services and invoking script thanks to the variable access routine IKJCT441

for compiled languages ( whatever ) You will have to use VGET and VPUT

does not make any difference if PL/1 or C or C++
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: User interactive C++ app

Postby NicC » Mon Oct 18, 2010 11:25 pm

I want to write user interactive application in C++, just as i said.


Assuming you mean you want to write something to a screen for the user to react to, enter data and send that data to the computer you still have not answered my question. Are you wanting to use ISPF facilities to communicate or just plain C++? You can communicate without ISPF panels - just printf, or whatever, to stdout which defaults to the screen.

Which version of ISPF are you using? Up to, and including, version1 release 7 there is no C++ support.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: User interactive C++ app

Postby Greenhouse » Tue Oct 19, 2010 1:04 pm

NicC wrote:
I want to write user interactive application in C++, just as i said.


Assuming you mean you want to write something to a screen for the user to react to, enter data and send that data to the computer you still have not answered my question. Are you wanting to use ISPF facilities to communicate or just plain C++? You can communicate without ISPF panels - just printf, or whatever, to stdout which defaults to the screen.

Which version of ISPF are you using? Up to, and including, version1 release 7 there is no C++ support.


Plain C++ is not the option for my task.

ISPF 6.0
Greenhouse
 
Posts: 25
Joined: Tue Sep 02, 2008 1:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: User interactive C++ app

Postby nxkjh » Sat Nov 26, 2011 1:06 pm

Hi,
This may be the user interactive program.
1. #include <iostream.h>
2.
3. int main(int argc, char* argv[])
4. {
5. unsigned long
6. nWidth = 0,
7. nHeight = 0,
8. nResult = 0;
9.
10. cout << "****************** Interactive Program ***********************\n";
11.
12. // Get the width.
13. cout << "Enter the width of the rectangle in centimeters: ";
14. cin >> nWidth;
15.
16. // Get the height.
17. cout << "Enter the height of the rectangle in centimeters: ";
18. cin >> nHeight;
19.
20. // Do the calculation, and assign it in the result
21. // nResult =
22.
23. // Now print the result.
24. cout << "The result is " << nResult;
25.
26. return 0;
27. }
28.
nxkjh
 
Posts: 3
Joined: Wed Nov 23, 2011 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to C, C++