Prompt override program does not work properly

Prompt override program does not work properly

Post by thomas.radd.. » Sat, 01 Sep 2001 15:40:37



Hi,

The command has a parameter (SRCFILE) of type ELEM that consists of 3
fields (File name, Libary and Member) per element. The min and max values
of SRCFILE are MIN(1) and MAX(9). When the prompt override program
finishs, then the overriden values of SRCFILE are passed back to the
command but obviously they are not "recognized" by the command. Although I
can see the overriden values of SRCFILE on the screen the values are not
passed to the following validity checker. Is it a bug in the OS/400 or am
I missing something.

The first parameter of the command (OPTION) is the only parameter that has
KEYPARM(*YES).

Any help would be greatly appreciated.

Thomas Raddatz.

 
 
 

Prompt override program does not work properly

Post by Ugo Gagliardell » Sat, 01 Sep 2001 21:06:28



> Hi,

> The command has a parameter (SRCFILE) of type ELEM that consists of 3
> fields (File name, Libary and Member) per element. The min and max values
> of SRCFILE are MIN(1) and MAX(9). When the prompt override program
> finishs, then the overriden values of SRCFILE are passed back to the
> command but obviously they are not "recognized" by the command. Although I
> can see the overriden values of SRCFILE on the screen the values are not
> passed to the following validity checker. Is it a bug in the OS/400 or am
> I missing something.

> The first parameter of the command (OPTION) is the only parameter that has
> KEYPARM(*YES).

With or without keyparm the prompt override program will work, then the
values passed back by it should be passed to the validity checker. I
made a lot of command like that and I did never  had that problem. The
validity checker must declare the same parameters of the processig
program, that's all.
--
Dr. Ugo Gagliardelli, Modena, Italy
Spaccamaroni andate a cagare/Spammers not welcome
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker

 
 
 

Prompt override program does not work properly

Post by Thomas Raddat » Sun, 02 Sep 2001 07:18:34


Ugo,

The command works fine (prompt override and validity checker program) for all
other parameters. Only the SRCFILE parameter which is of type ELEM with 3 fields
per ELEM cause the problems. So I think it only has to do with the TYPE(ELEM1)
keyword.

Thomas Raddatz.

Ugo Gagliardelli schrieb:


> > Hi,

> > The command has a parameter (SRCFILE) of type ELEM that consists of 3
> > fields (File name, Libary and Member) per element. The min and max values
> > of SRCFILE are MIN(1) and MAX(9). When the prompt override program
> > finishs, then the overriden values of SRCFILE are passed back to the
> > command but obviously they are not "recognized" by the command. Although I
> > can see the overriden values of SRCFILE on the screen the values are not
> > passed to the following validity checker. Is it a bug in the OS/400 or am
> > I missing something.

> > The first parameter of the command (OPTION) is the only parameter that has
> > KEYPARM(*YES).
> With or without keyparm the prompt override program will work, then the
> values passed back by it should be passed to the validity checker. I
> made a lot of command like that and I did never  had that problem. The
> validity checker must declare the same parameters of the processig
> program, that's all.
> --
> Dr. Ugo Gagliardelli, Modena, Italy
> Spaccamaroni andate a cagare/Spammers not welcome
> Spamers iros a la mierda/Spamers allez vous faire foutre
> Spammers loop schijten/Spammers macht Euch vom Acker

--
*=====================================================*

   e-mail Adresse:

   Homepage:
        http://www.tools400.de

*=====================================================*

 
 
 

Prompt override program does not work properly

Post by Ugo Gagliardell » Tue, 04 Sep 2001 18:32:31



> Ugo,

> The command works fine (prompt override and validity checker program) for all
> other parameters. Only the SRCFILE parameter which is of type ELEM with 3 fields
> per ELEM cause the problems. So I think it only has to do with the TYPE(ELEM1)
> keyword.

I should make some tests to be sure, up to now I cannot remember any
problem with validity checker and parms with elem keyword specified.
--
Dr. Ugo Gagliardelli, Modena, Italy
Spaccamaroni andate a cagare/Spammers not welcome
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker
 
 
 

Prompt override program does not work properly

Post by thomas.radd.. » Tue, 04 Sep 2001 20:12:51


Please let me know about the results of your tests. This is how the
"trouble maker" is defined:

PARM       KWD(SRCFILE) TYPE(ELEM1) MIN(1) MAX(9) +
             PROMPT('Source File(s)')

ELEM1:      ELEM       TYPE(*NAME) LEN(10) +
                         PROMPT('File Name')
            ELEM       TYPE(*NAME) LEN(10) PROMPT('  Library')
            ELEM       TYPE(*GENERIC) LEN(10) DFT(*ALL) SPCVAL((*ALL)) +
                         CHOICE('*ALL, name, generic*') +
                         PROMPT('    Member')

Thomas Raddatz

 
 
 

Prompt override program does not work properly

Post by Ugo Gagliardell » Tue, 04 Sep 2001 22:18:36


It works.
These are sources of my test case:

Prompt override (COMANDOO):
PGM (&CMD &STR)                                                    
DCL &CMD *CHAR 10                                                  
DCL &STR *CHAR 5700                                                
DCL &BIN *CHAR 2 X'0028'                                          
CHGVAR &STR (&BIN *TCAT 'SRCFILE((PROVALIB PROVAFILE PROVAMBR))')  
SNDPGMMSG  MSG('POP' *CAT &STR)                      
ENDPGM

Command processing (COMANDOP):
PGM &SRCF                                    
DCL &SRCF *CHAR 32                            
SNDPGMMSG  MSG('CPP' *CAT &SRCF)
ENDPGM

Validity checker (COMANDOV):
PGM &SRCF                                      
DCL &SRCF *CHAR 32                            
SNDPGMMSG  MSG('VPP' *CAT &SRCF)  
ENDPGM

Command (COMANDO):
compiled with:  
CRTCMD CMD(COMANDO) PGM(COMANDOP) SRCFILE(SRCF) VLDCKR(COMANDOV)
PMTOVRPGM(COMANDOO)                                                                      
CMD 'PROVA COMANDO'                                                      
PARM       KWD(SRCFILE) TYPE(ELEM1) MIN(1) MAX(9) +                      
             PROMPT('SOURCE FILE(S)')                                    
ELEM1:      ELEM       TYPE(*NAME) LEN(10) +                            
                         PROMPT('FILE NAME')                            
            ELEM       TYPE(*NAME) LEN(10) PROMPT('  LIBRARY')          
            ELEM       TYPE(*GENERIC) LEN(10) DFT(*ALL) SPCVAL((*ALL)) +
                         CHOICE('*ALL, NAME, GENERIC*') +                
                         PROMPT('    MEMBER')                            

Input line entered:
COMANDO + F4

Output from joblog:
COMANDO SRCFILE((PROVALIB PROVAFILE PROVAMBR))    
POP  SRCFILE((PROVALIB PROVAFILE PROVAMBR))      
VPP      PROVALIB  PROVAFILE PROVAM              
CPP      PROVALIB  PROVAFILE PROVAM              

Non displayable characters are:
POP + x'0028'
VPP + x'000100040003'
CPP + x'000100040003'
as expected. That's it.


> Please let me know about the results of your tests. This is how the
> "trouble maker" is defined:

> PARM       KWD(SRCFILE) TYPE(ELEM1) MIN(1) MAX(9) +
>              PROMPT('Source File(s)')

> ELEM1:      ELEM       TYPE(*NAME) LEN(10) +
>                          PROMPT('File Name')
>             ELEM       TYPE(*NAME) LEN(10) PROMPT('  Library')
>             ELEM       TYPE(*GENERIC) LEN(10) DFT(*ALL) SPCVAL((*ALL)) +
>                          CHOICE('*ALL, name, generic*') +
>                          PROMPT('    Member')

> Thomas Raddatz

--
Dr. Ugo Gagliardelli, Modena, Italy
Spaccamaroni andate a cagare/Spammers not welcome
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker
 
 
 

Prompt override program does not work properly

Post by thomas.radd.. » Wed, 05 Sep 2001 20:33:49


Thanks a lot for the valuable information you provided. I found the error
and here is what happend:

Since the "CL Programming" guide states "Precede each keyword with a
selective prompt character to define how to display the parameter and what
value to pass to the CPP." I added selective prompting characters to each
keyword in the command string by the prompt override program. But since I
did not notice that parameters with MIN(1) must be preceded with "??"
instead of "?<" I added the "?<" to the SRCFILE parameter. That was the
mistake I made. After having removed the selective prompting it works
fine, now. I also tried "??" and it works fine, too.

However I see no difference between "??" and no selective prompting
characters. Maybe that someone can enlighten me?

Thomas Raddatz.

 
 
 

Prompt override program does not work properly

Post by Ugo Gagliardell » Fri, 07 Sep 2001 02:16:45



> However I see no difference between "??" and no selective prompting
> characters. Maybe that someone can enlighten me?

The way I understand this figure is that each parameter a prompt overide
program specify, is like a ?? selective prompting were specified for
that parameter. In other words they do the same job and for that the
result must be the same.

--
Dr. Ugo Gagliardelli, Modena, Italy
Spaccamaroni andate a cagare/Spammers not welcome
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker

 
 
 

1. STRPCCMD should not work but does; RUNRMTCMD should work but does not

According to the documentation (Client Access Family) the way to run a PC
command from an AS/400 session is STRPCCMD for DOS, Windows 3.1 and OS/2.
For Windows 95/NT one should use RUNRMTCMD.  However, on my PC (Windows 95,
twinax, NetSoft router, CA V3R1M2, OS/400 V3R2) STRPCCMD does work but
RUNRMTCMD does not.

For RUNRMTCMD the daemon program AREXECDN.EXE should be running on the PC.
This has been installed on the PC, but when I start it, it does not seem to
do anything.  No information, no process running.  When I try RUNRMTCMD from
an AS/400 session, the job log says that the remote system 'did not
recognize the transaction program' (quoting from memory).

Any ideas why STRPCCMD appears to be unsupported?  Will it suddenly vanish
in a future release?  Will it not work with TCP/IP (not with V3R1M2 anyway;
the session is not recognized as a PC session)?

Any ideas how I could get RUNRMTCMD to work?

Joep Beckeringh

2. FAQ: All about FTP

3. Prompt Override Program parms not returned to CPP - ??

4. Mail Sync to Netscape stopped working

5. STRHOSTSVR in QSTRUP does not work properly

6. 486 DX4 133 - $750

7. How the force the use of a Prompt Override Program without pressing F4?

8. Lotus Notes Jobs Overseas

9. Prompt Override Question

10. Does F9 not work for QSECOFR

11. Calling RPG from Visual Basic - Commitment Control does not work

12. IBM 4247 Host print transform does not work

13. Flex/IP - LPD and AS/400 -LPR Does not always work!