|
We have a command that looks like the following:
Remote user ID . . . . . . . . .
Remote password . . . . . . . .
Remote system or IP address . . GDIHQ
Prompt input file data? . . . . Y Y, N
Input file . . . . . . . . . . . FTPIN Name
Library . . . . . . . . . . . *DEVELOP Name, *DEVELOP, *LIBL,
*NONE
Input file member . . . . . . . *FILE Character value, *FILE
Now we want to use this in CL programs. However I didn't want to bury
user id's and passwords in a program. So I thought I'd be clever and
create a second command that runs the same program. Looks like this:
Remote system or IP address . . GDIHQ
Prompt input file data? . . . . Y Y, N
Input file . . . . . . . . . . . FTPIN Name
Library . . . . . . . . . . . *DEVELOP Name, *DEVELOP, *NONE
Input file member . . . . . . . *FILE Character value, *FILE
Notice, no user id and password? That's done via this:
CMD PROMPT('Execute FTP Commands')
PARM KWD(RMTUSR) +
TYPE(*CHAR) +
LEN(10) +
CONSTANT(removed from your view) +
MIN(1)
PARM KWD(RMTPWD) +
TYPE(*CHAR) +
LEN(10) +
CONSTANT(removed from your view) +
MIN(1)
PARM KWD(RMTSYS) +
TYPE(*CHAR) +
LEN(256) +
DFT(GDIHQ) +
PROMPT('Remote system or IP address')
PARM KWD(INFILP) +
TYPE(*CHAR) +
LEN(1) +
RSTD(*YES) +
DFT(Y) +
VALUES( +
'Y' +
'N') +
PROMPT('Prompt input file data?')
PARM KWD(QINFIL) +
TYPE(Q01D8) +
CHOICE(*NONE) +
PROMPT('Input file')
PARM KWD(INMBR) +
TYPE(*CHAR) +
LEN(10) +
DFT(*FILE) +
SPCVAL( +
(*FILE )) +
PROMPT('Input file member')
Q01D8: QUAL TYPE(*NAME) +
LEN(10) +
DFT(FTPIN)
QUAL TYPE(*NAME) +
LEN(10) +
DFT(*DEVELOP) +
SPCVAL( +
(*DEVELOP ) +
(*NONE )) +
PROMPT('Library')
Due to the extremely weak security on our development machine, and the
lack of permission to do anything about it, I kept the source off the
system and thought I was being clever. Well, the newest programmer, (who
was working as an engineer at a different company before starting here and
we just hired him as a programmer because he had the right aptitude and
his brother and dad are good) figured out how to use RTVCMDSRC to
decompile it. (He wanted to change the size of the password and user id
fields.) Granted, even if I could figure out how to create this command
so that RTVCMDSRC didn't work he'd figure it out (debug the CL program
called - he told me this, dang these new guys are clever) I'd still like
to do this if possible. Is there some option on CRTCMD that would work?
Rob Berendt
--
"All creatures will make merry... under pain of death."
-Ming the Merciless (Flash Gordon)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.