How to pass the QRY variable to the EXPDTA command in a CL?

FAQs and general information.

Moderator: Support

Support
Site Admin
Posts: 390
Joined: 03/12/04 02:12:52 PM
Location: Omaha, NE
Contact:

How to pass the QRY variable to the EXPDTA command in a CL?

Postby Support » 02/16/16 02:54:54 PM

How to pass the QRY variable to the EXPDTA command in a CL?

Below is a sample CL program that is passing variables to the EXPDTA command:


SRCDTA
PGM
DCL VAR(&WHAIR) TYPE(*CHAR) LEN(4) VALUE('Blnd')
DCL VAR(&WGEN) TYPE(*CHAR) LEN(1) VALUE('F')
DCL VAR(&QRY) TYPE(*CHAR) LEN(500)
DCL VAR(&QUOTE) TYPE(*CHAR) LEN(2) VALUE('''''')


CHGVAR VAR(&QRY) VALUE('SELECT EDID, EDLNAME, EDFNAME +
FROM SURVEYOR.DEMO where EDHAIR = ' *CAT &QUOTE +
*CAT &WHAIR *CAT &QUOTE *CAT ' and EDGENDER = ' +
*CAT &QUOTE *CAT &WGEN *CAT &QUOTE *CAT ' order +
by EDID')

SURVEYOR/EXPDTA USEQRY(*YES) QRY(&QRY) +
IFSDEST('/linoma/surveyor/Demo16253.txt') +
JAVAVER(1.5)

ENDPGM

Return to “Surveyor/400”

Who is online

Users browsing this forum: VibaldOnencunny and 1 guest

cron