Hi Mark,

Good question.

I had some notes from some training I attended a looooong time ago which
is what I was basing my answer on.

I presumed as all the command parameters are passed to the CVP that you
would need to calculate using the length of the values passed. You know
the length of the keywords.

The error message needs to come from the validity checking program not the
CPP.

Eg
CMD PROMPT('example')
VLDCKR PGM(MYLIB/MYVLD)
...
...

I have not been able to find any IBM documentation on this, and I am sure
they have ways of doing things under the covers that may be difficult to
reproduce.

I don't have time to play with this but testing with a simple command may
through trial and error reveal the secret formula.

Message must be a *DIAG message from the VCP and an escape message if an
error is detected so the CPP is not called.

Would be interested in the result though ... 😊
Cheers
Don

 

Don Brown

Senior Consultant
 
[1]OneTeam IT Pty Ltd
P: 1300 088 400

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Mark
Waterbury via MIDRANGE-L
Sent: Thursday, 5 February 2026 7:49 AM
To: Don Brown via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Mark Waterbury <mark.s.waterbury@xxxxxxxxxxxxx>
Subject: Re: Highlighting command parm in error in command validation
program?

Hi, Don,
I had the same question as David.
A VCP normally only receives the same parameters as the CPP, based on the
command definition, not the entire "command string" -- so how can you pass
a position in the command string?
Thanks,
Mark S. Waterbury
> On Wednesday, February 4, 2026 at 04:45:12 PM EST, Don Brown via
MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

  I think it works like this, but this is only from some notes I had from
  years back.

  Example

  MYCMD PARM1(x) STATUS()

  And you want to highlight STATUS

  STATUS is position 16 in the command string, therefore if you put binary
  16 '00010000' in the first 4 bytes that should work.

  If it does, great! If it does not then either my note taking is missing
  something or something may have changed.

  Will be interested in the results.

  Thanks
  Don

   

  Don Brown

  Senior Consultant
   
  [1]OneTeam IT Pty Ltd
  P: 1300 088 400

  -----Original Message-----
  From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
  David Gibbs via MIDRANGE-L
  Sent: Thursday, 5 February 2026 1:40 AM
  To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
  Cc: David Gibbs <david@xxxxxxxxxxxx>
  Subject: Re: Highlighting command parm in error in command validation
  program?

  On Tue, Feb 3, 2026 at 5:43 PM Don Brown <dbrown@xxxxxxxxxxxxxxxx>
wrote:

  > Those 4 bytes must contain:
  >
  > A 4-byte binary integer (X'00000001' (binary)) specifying the relative
  > character position (1-based) of the parameter in error within the
  > command string.
  >

  Character position or field position?

  I tried field position with no luck.

  david
  --
  This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
  list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe,
  unsubscribe, or change list options,
  visit: [2][2]https://lists.midrange.com/mailman/listinfo/midrange-l
  or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
  Before posting, please take a moment to review the archives at
  [3][3]https://archive.midrange.com/midrange-l.

  Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
  questions.

  --
  Message protected by MailGuard: e-mail anti-virus, anti-spam and content
  filtering.
  [4][4]https://www.mailguard.com.au

References

  Visible links
  1. [5]https://www.oneteamit.com.au/
  2. [6]https://lists.midrange.com/mailman/listinfo/midrange-l
  3. [7]https://archive.midrange.com/midrange-l.
  4. [8]https://www.mailguard.com.au/
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: [9]https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
[10]https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: [11]https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
[12]https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

--
Message protected by MailGuard: e-mail anti-virus, anti-spam and content
filtering.
[13]https://www.mailguard.com.au

References

Visible links
1. https://www.oneteamit.com.au/
2. https://lists.midrange.com/mailman/listinfo/midrange-l
3. https://archive.midrange.com/midrange-l.
4. https://www.mailguard.com.au/
5. https://www.oneteamit.com.au/
6. https://lists.midrange.com/mailman/listinfo/midrange-l
7. https://archive.midrange.com/midrange-l.
8. https://www.mailguard.com.au/
9. https://lists.midrange.com/mailman/listinfo/midrange-l
10. https://archive.midrange.com/midrange-l.
11. https://lists.midrange.com/mailman/listinfo/midrange-l
12. https://archive.midrange.com/midrange-l.
13. https://www.mailguard.com.au/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.