View previous topic :: View next topic
|
Author |
Message |
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
In a CICS map field we have to enter name of 40 char, initially it having cursor to enter the new field. If we enter 10 char in middle then remaining cursor field should get trimmed and only alphabets should get moved.
Also i should not accept the special char among these 40 chars. How can we identify easily. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I don't understand your first paragraph, so please clarify. Write sufficient with the idea that we know nothing about the problem you are describing.
For your validation, it may be easier to identify the characters which are allowed. Remember, certain punctuation characters are valid in some "European" names, if you have any of those. |
|
Back to top |
|
|
Gopalakrishnan V
Active User
Joined: 28 Jun 2010 Posts: 102 Location: chennai
|
|
|
|
Code: |
ACT ID NAME
_ ___ ________________________________________
_ 001 MAINFRAME
|
The name field should accept only alphabets not any special characters and numbers. How can we omit special chars?
Also while entering the name, no need to enter from first position may be from middle. For that how can we trim cursors alone? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Consult the Cobol manual for ALPHABETIC- class tests.
Still no clear idea what you mean about the rest. Not even no clear. No idea at all.
So, you wait for someone else or you describe exactly what you want to do so that someone who doesn't know what you want to do can understand what you want to do. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It will help if you use only standard terminology. I have never heard of "trimming a cursor". . .
It appears you did not read (or understand) what Bill posted:
Quote: |
For your validation, it may be easier to identify the characters which are allowed. Remember, certain punctuation characters are valid in some "European" names, if you have any of those. |
Quote: |
How can we identify easily. |
Depends on what you consider easily.
One way to get what i believe you want is to define the field as a 1-byte array and beginning from the right look for the first non-blank character. From that point, continue to the left ensuring that every character is "valid" for the field until you reach the first character. Then discard leading spaces if you do not want them. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
What are the characters you need to keep as-is?
Once you've determined this, then it's just a matter of building a "From" and "To" table for a subsequent INSPECT, with the "From table" containing all 256-entries of X'00' through X'FF' and the "To table" having only the "keepers" and the remaining "To Table" entries containing SPACES.
Click here on a previous post which may help -
www.ibmmainframes.com/viewtopic.php?p=143786&highlight=#143786 |
|
Back to top |
|
|
|