Simple AS/400 form with input field

Profile: felixb
Tags:
AS/400
CL Program
DSPF
Hi, I need to create simple form in AS/400 that will allow:
  1. Type input parameter.
  2. Run CL (the CL will get the input parameter).
I have created the screen with SDA and now I have DSPF object.
  1. How can I connect the CL to the form?
  2. How can I run/activate the form (after I have the DSPF object)

6 Replies to this discussion

 
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 other members reply.
  • pdraebel
    In the CL you have to declare the Display file (form) with the DCLF statement. A SNDRCVF statement is used to display and read the form.
    7,545 pointsBadges:
    report
  • felixb
    can you post an example?
    95 pointsBadges:
    report
  • ToddN2000
    Post the code you have tried. We can help you, but this sounds like a  homework question.
    131,550 pointsBadges:
    report
  • pdraebel
    DCLF       FILE(SI5017D)                      
    RTVJOBA    TYPE(&TYPE)                                      
                                                             
    IF         COND(&TYPE *EQ '1') THEN(DO) /* Interactive */   
                                
    SNDRCVF         

    The SNDRCVF command allows you to specify also the record format to display.                                           
    7,545 pointsBadges:
    report
  • pdraebel
    In case you only want to prompt and receive input parameters only once to start the CL program you could also look at creating a command for the CL program. The program would then need to have input parameters :
    PGM PARM(&PARM1 &PARM2)

    7,545 pointsBadges:
    report
  • felixb
    Thanks for the reply, it helped.
    95 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: