data search using popup window

5 pts.
Tags:
CL
iSeries
Physical Files
RPG
SQL
Is there a sample RPG/CL/SQL code on how to create a popup window to search data from a PF?

Software/Hardware used:
RPG, CL, SQL, iSeries

Answer Wiki

Thanks. We'll let you know when a new response is added.

You should be able to modify this to do what you need.

<pre>

A*%%TS SD 20081210 094755 REL-V5R4M0 5722-WDS
A*%%EC
A DSPSIZ(24 80 *DS3)
A PRINT
A INDARA
A CF12(12 ‘CANCEL DELETE’)
A R WS1
A*%%TS SD 20081210 094755 REL-V5R4M0 5722-WDS
A OVERLAY
A WINDOW(10 14 7 50)
A WDWBORDER((*COLOR BLU) (*DSPATR RI)-
A (*CHAR ‘ ‘))
A 2 4′ARE YOU SURE YOU WANT TO DELETE TH-
A IS RECORD?’
A DSPATR(HI)
A COLOR(RED)
A SCRYESNO 1A B 3 26DSPATR(HI)
A 4 25′Y/N’
A DSPATR(HI)
A COLOR(RED)
A 6 17′F12 = CANCEL DELETE’
A COLOR(BLU)
A R ASSUME
A*%%TS SD 20001121 094527 REL-V4R4M0 5769-PW1
A ASSUME
A OVERLAY
A 2 2′ ‘
A DSPATR(ND)

‚**********************************************************************
‚* SET COMPILER OPTIONS
‚**********************************************************************
HNOMAIN
HOPTION(*NODEBUGIO:*SRCSTMT)
‚**********************************************************************
‚* PROGRAM NAME: AREYOUSURE
‚* CREATION DATE: 08/12/08
‚* PURPOSE OF PROGRAM: DISPLAY RECORD DELETE VALIDATION SCREEN.
‚**********************************************************************
‚* FILES USED BY PROGRAM.
‚**********************************************************************
FAREUSUREFMCF E WORKSTN USROPN
F INFDS(WSINFDS)
‚**********************************************************************
‚* KEY PRESS DATA STRUCTURE.
‚**********************************************************************
D WSINFDS DS
D CMD_KEY 369 369A
‚**********************************************************************
‚* PROTOTYPE FOR PROCEDURE
‚*********************************************************************
D AREYOUSURE PR 1
‚*********************************************************************
‚* START PROCEDURE DEFINITION
‚*********************************************************************
P AREYOUSURE B EXPORT
D AREYOUSURE PI 1
‚**********************************************************************
‚* COMMAND KEY DEFINITIONS.
‚**********************************************************************
D CANCEL_DELETE C Const(x’3C’)
‚*********************************************************************
‚* FIELD DEFINITIONS
‚*********************************************************************

//‚******************************************************************
//‚* START FREE FORM CALCS.
//‚******************************************************************

/FREE

//‚******************************************************************
//‚* SET SCREEN DEFAULTS.
//‚* OPEN VERIFICATION WINDOW.
//‚******************************************************************

SCRYESNO = ‘N’;

OPEN AREUSUREFM;

EXFMT WS1;

IF CMD_KEY = CANCEL_DELETE;

SCRYESNO = ‘N’;

ENDIF;

CLOSE AREUSUREFM;

//‚******************************************************************
//‚* RETURN SCREEN VALUE TO CALLING PROGRAM.
//‚******************************************************************

*INLR = *ON;
RETURN SCRYESNO;

/END-FREE

P AREYOUSURE E

</pre>

Discuss This Question:  

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following