IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Change field case programmatically


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Wed Oct 08, 2014 6:48 pm
Reply with quote

I know I can set CASE=MIXED on a field when I assemble the map, but is there a way to change the option from within the program, like we do with color and highlighting?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 08, 2014 8:30 pm
Reply with quote

Review the "SET TERMINAL" API. Note that you will need to specify Translator Option "SP". Verify with your Tech Support personnel whether you can use this or not.
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Wed Oct 08, 2014 8:37 pm
Reply with quote

I've tried using the SET TERMINAL command. If I set it on when I enter the program then it works, but it translates all fields on the map, and stays on even when they leave the transaction.

I tried turning it on and off within the same session, but then it doesn't work at all.

Problem is, I only need one field to be able to enter mixed characters.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 08, 2014 9:14 pm
Reply with quote

Allow the user the ability to enter all UC characters. Then verify that they have done as such. Define a map-field template, showing which positions can be LC and use FUNCTION LOWER-CASE to convert each position to Lower-Case.

That's about all I can offer....
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Wed Oct 08, 2014 10:43 pm
Reply with quote

Any idea why the CASE=MIXED on a field doesn't work? Is there something special that needs to be set up for this? Everything I've been able to find inimates that CASE=MIXED and ASIS should allow a single field to be defined as caseless, but it doesn't seem to work. Like there's another setting missing.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 09, 2014 4:12 am
Reply with quote

I've never heard of CASE=MIXED, especially at the map-field level.

Could this be a Macro defined to your 3270-emulator?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Oct 09, 2014 5:06 am
Reply with quote

Below links should solve your issue.
publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=%2Fcom.ibm.cics.te.doc%2Ferziai00160.htm
ibmmainframes.com/viewtopic.php?t=43697&postdays=0&postorder=asc&start=0
ibmmainframes.com/about10028.html


also try,

UCTRAN=TRANID in the TYPETERM and set your
transaction to UCTRAN=NO, that way, the value in the
PCT entry will take precedence.
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Thu Oct 09, 2014 4:59 pm
Reply with quote

Bill O'Boyle wrote:
I've never heard of CASE=MIXED, especially at the map-field level.

Could this be a Macro defined to your 3270-emulator?


From IBM's manual at:

publib.boulder.ibm.com

Quote:
MAP1 DFHMSD TYPE=&SYSPARM,MODE=INOUT,LANG=COBOL,STORAGE=AUTO, X
TIOAPFX=YES
MAP1 DFHMDI SIZE=(30,60),MAPATTS=(COLOR,HILIGHT),DSATTS=(COLOR, X
HILIGHT),LINE=1,COLUMN=1,COLOR=GREEN,HILIGHT=REVERSE
DFHMDF POS=(6,10),LENGTH=11,ATTRB=(UNPROT,NORM),CASE=MIXED, X
INITIAL='Hello World'
DFHMDF POS=(6,22),ATTRB=(ASKIP,NORM),LENGTH=0
DFHMDF POS=(10,10),LENGTH=9,ATTRB=(UNPROT,NORM),CASE=MIXED, X
INITIAL='Bye World'
DFHMDF POS=(10,20),ATTRB=(ASKIP,NORM),LENGTH=0
MAP1 DFHMSD TYPE=FINAL
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Thu Oct 09, 2014 5:31 pm
Reply with quote

Rohit Umarjikar wrote:
Below links should solve your issue.
publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=%2Fcom.ibm.cics.te.doc%2Ferziai00160.htm
ibmmainframes.com/viewtopic.php?t=43697&postdays=0&postorder=asc&start=0
ibmmainframes.com/about10028.html


also try,

UCTRAN=TRANID in the TYPETERM and set your
transaction to UCTRAN=NO, that way, the value in the
PCT entry will take precedence.



Thanks. Except for the first link they all talk about making the entire map case sensitive, I am looking at only one field. I'm guessing, despite the CASE=MIXED parm, this is not possible.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 09, 2014 5:40 pm
Reply with quote

Your example is prefixed by

Quote:
... on CICS on Open Systems suppose you want a map to look like this, where both fields are in reverse video and nothing is in between:


So until you can find z/OS CICS having the CASE=MIXED the example is not much use to you.

Exactly what is not working? What problem does having all the fields allow mixed-case, but you translate everything else to upper-case give you?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 09, 2014 6:21 pm
Reply with quote

OK, I stand corrected, Having done much BMS in decades.
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Thu Oct 09, 2014 6:59 pm
Reply with quote

Bill Woodger wrote:
Your example is prefixed by
.
.
Exactly what is not working? What problem does having all the fields allow mixed-case, but you translate everything else to upper-case give you?


Two problems. First the sheer number of fields that would need translation, considering how often the screen is accessed daily. Our IT dept has contractual turnaround times, and our Technical Review Board won't allow it.

Second, and a larger problem, is what has been stated on this forum and in IBM's manuals, if the application terminates for any reason without doing a UCTRAN then all terminal sessions will work in mixed case. I can't affect other applications, even inadvertently.

In our situation, the second issue has other ramifications. We have some type of CICS windowing app that allows the users to have more than one CICS window active, all using the same ID. Testing this I find that if I allow lowercase in window A (SET command) it permiates to all of the other windows. I have tried turning it on before I receive the map, then off afterwards, but the case change doesn't take place. As in the instructions, it won't work for the first RECEIVE command after it's turned on.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 09, 2014 7:58 pm
Reply with quote

Good to know you're concerned about such things.

Doesn't look easy to do, perhaps not realistically possible.

May be worth a PMR to IBM.

So what is in the mixed-case field? Can you intuit the likely-casedness of each letter (as in first of each element capitalised, remainder lower, or something)?

I know that "Alan De La Haye" can, for a different person, be "Alan de la Haye", but the second person has probably lots of experience of computers garbling their name. Not ideal, but most will be correct and better than uppercasing the lot.
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Thu Oct 09, 2014 8:02 pm
Reply with quote

Bill Woodger wrote:
Good to know you're concerned about such things.

Doesn't look easy to do, perhaps not realistically possible.

May be worth a PMR to IBM.

So what is in the mixed-case field? Can you intuit the likely-casedness of each letter (as in first of each element capitalised, remainder lower, or something)?

I know that "Alan De La Haye" can, for a different person, be "Alan de la Haye", but the second person has probably lots of experience of computers garbling their name. Not ideal, but most will be correct and better than uppercasing the lot.


The field is customer comments, which can contain acronyms, part numbers, etc. The desire was to make the resulting email look more professional, instead of the blocky all-caps that it does now.

Question, though I think I know the answer: Is there a way to receive the map twice in a program without the user having to hit the AID twice? In testing I found that the 2nd recieve does bring back lowercase, but I have to hit the AID twice to get the 2nd receive to work.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Oct 09, 2014 8:33 pm
Reply with quote

Quote:
Thanks. Except for the first link they all talk about making the entire map case sensitive, I am looking at only one field. I'm guessing, despite the CASE=MIXED parm, this is not possible.


This is the extract from the second link, while you get other choices you can also consider this.

Quote:
Getting back to the original question, you could use reference modification to move each byte of your string to a one-byte field that has some 88 levels defined on it: Code:
Code:
88  LOWER-CASE     VALUE 'a' THRU 'i',
                         'j' THRU 'r',
                         's' THRU 'z'.
88  UPPER-CASE     VALUE 'A' THRU 'I',
                         'J' THRU 'R',
                         'S' THRU 'Z'.
88  NUMBERS-ONLY   VALUE '0' THRU '9'.
This allows you to test each byte individually. You mentioned special characters so you'd want another 88 level for them -- but that's trivial to add.
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Thu Oct 09, 2014 8:44 pm
Reply with quote

Rohit Umarjikar wrote:
This is the extract from the second link, while you get other choices you can also consider this.


I wish it were that simple, but caps can appear anywhere withing the text, and if they are entered then they must be preserved.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Oct 09, 2014 8:51 pm
Reply with quote

Quote:
I wish it were that simple, but caps can appear anywhere withing the text, and if they are entered then they must be preserved.


What is the max. size of this comments box? This logic is on byte to byte check. So I might be missing something but where exactly do you think this is difficult?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 09, 2014 10:55 pm
Reply with quote

Do you have enough room to expand the map-field?

Could you then give the users instructions to place a starter-byte, followed by UC data and ending with a stopper-byte? The starter and stopper would be of your own choosing.

When you parse the map-field, only convert the UC letters entered that fall between the starter/stopper to LC.

Just a thought....
Back to top
View user's profile Send private message
pahiker

New User


Joined: 10 Aug 2012
Posts: 51
Location: USA

PostPosted: Thu Oct 09, 2014 11:25 pm
Reply with quote

Bill O'Boyle wrote:
Do you have enough room to expand the map-field?

Could you then give the users instructions to place a starter-byte, followed by UC data and ending with a stopper-byte? The starter and stopper would be of your own choosing.

When you parse the map-field, only convert the UC letters entered that fall between the starter/stopper to LC.

Just a thought....


Thanks. Not enough realestate on the screen, it's pretty packed.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts SELECT from data change table DB2 5
Search our Forums:

Back to Top