Calculator on DSPF screen on AS/400

Tags:
AS/400
DSPF
Screen- 0 to 9 buttons , and +,-,= button. If I click 0 to 9, it will be display on screen and click = then show the result on the screen. Please give me the screen shot.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 13  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • hunshabbir7
    Hi Satyamohanty Welcome!

    The purpose of this forum is to discuss the problems you are facing while development or providing some initial ideas for your tasks. It is not supposed that specs will be provided and programmers will be developing according to those specs.

    Thanks, 
    2,900 pointsBadges:
    report
  • Satyamohanty
    I have to implement that one , but i don't know how... so please give me some idea.

    Thanks
    65 pointsBadges:
    report
  • hunshabbir7
    I wonder! anyhow you will be doing it using SDA (Screen Design Aid) utility (STRSDA) >> Go to Option 1 and give your Display file a name and you will be presented another screen where you will be adding Record Formats and design what ever you want.
    2,900 pointsBadges:
    report
  • hunshabbir7
    Then there will be a code behind file where you will implement your (Calculator) program logic. You will add the design file which you created first. (All input validations and calculations will be performed here). You will also present output from here.
    2,900 pointsBadges:
    report
  • Satyamohanty
    i know that much, but if I click on F3 then it goes back right. like that only if I click on 0 to 1 and any arithmetic sign, it should be display and when we press = then it will show the result.
    65 pointsBadges:
    report
  • ToddN2000
    I would suggest looking at the macro logic that lets you click on F3 to exit instead the screen of pressing the actual F3 key. Sounds like a lot of work for something when calculators already exist. Is this a homework question? If so, show us what you have and we can help you through it.
    131,645 pointsBadges:
    report
  • Jjk

    d Calc            Pr                  ExtPgm('CALC')

    d V69InfDs        Ds                
    d  Fkey                 369    369 

    d Calculator      c                   X'34'

    When FKey=Calculator;   
         Calc();            

    CLLE CALC program

    Pgm                                                              
                                                                     
       Dcl  &Cmd      *Char 123                                     
       Dcl  &Path      *Char   89                                     
       Strpco Pcta(*No)                                              
       Monmsg Iws4010                                                
       ChgVar &Path ('calc')                                         
       ChgVar &Cmd ('rundll32 shell32,ShellExec_RunDLL ' *Bcat &Path)
       StrPcCmd PcCmd(&Cmd) Pause(*No)                               
    EndPgm                                                             


    35 pointsBadges:
    report
  • Satyamohanty
    Actually my manager assigned me and told me to do in Mocha..
    65 pointsBadges:
    report
  • philpl1jb

    I'm so confused.

    You are using Mocha .. which is a client .. a window that runs on your PC and connects to the 400.

    You can write some macro stuff at the client level in Mocha.  I don't know if that's what you are trying to do.  Seems like a very heavy application for the script in Mocha.

    Alternatively you could do host based stuff.  Create a display file on the AS/400 and control and run it from a programming language (RPG/COBOL/CLLE) on the host.

     


    You have made an display file on the host AS/400 / I-series. Then you have some programming

    54,090 pointsBadges:
    report
  • Jaya48482

    Hi,

    please let me know how can I write the calculator program in AS/400 by using RPGLE

    10 pointsBadges:
    report
  • ToddN2000
    @jaya48482: Post the code you have and we can help fix it. It's not that hard of a class assignment.
    131,645 pointsBadges:
    report
  • TheRealRaven
    A calculator window could look something like:
    ...................
    : 123456789012345 :
    :-----:-----:-----:
    :  1  :  2  :  3  :
    :-----:-----:-----:
    :  4  :  5  :  6  :
    :-----:-----:-----:
    :  7  :  8  :  9  :
    :-----:-----:-----:
    :  0  :  +  :  -  :
    :-----:-----:-----:
    :        =        :
    :.................:
    Each symbol would be a separate single-char field, and each click would be an <Enter>. The program would redisplay each time, sending only the result value back out.

    As digits are entered, they'd be concatenated to a string which is converted to numeric and redisplayed. When an operation symbol is entered, the operation is either queued or executed, depending on whether a queued operation is pending.

    34,485 pointsBadges:
    report
  • ToddN2000
    The calculator assignment is a good teaching tool yet in the real world would most likely never be used. Take Ravens example for a starting point, add any additional functions you may be required and come back if you run into coding issues. We are here to help.
    131,645 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: