Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Change field case programmatically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
pahiker

New User


Joined: 10 Aug 2012
Posts: 28
Location: USA

PostPosted: Wed Oct 08, 2014 6:48 pm    Post subject: Change field case programmatically
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 08, 2014 8:30 pm    Post subject: Reply to: Change field case programmatically
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: 28
Location: USA

PostPosted: Wed Oct 08, 2014 8:37 pm    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 08, 2014 9:14 pm    Post subject: Reply to: Change field case programmatically
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: 28
Location: USA

PostPosted: Wed Oct 08, 2014 10:43 pm    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 09, 2014 4:12 am    Post subject: Reply to: Change field case programmatically
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

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

Below links should solve your issue.
http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=%2Fcom.ibm.cics.te.doc%2Ferziai00160.htm
http://ibmmainframes.com/viewtopic.php?t=43697&postdays=0&postorder=asc&start=0
http://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: 28
Location: USA

PostPosted: Thu Oct 09, 2014 4:59 pm    Post subject: Re: Reply to: Change field case programmatically
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: 28
Location: USA

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

Rohit Umarjikar wrote:
Below links should solve your issue.
http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=%2Fcom.ibm.cics.te.doc%2Ferziai00160.htm
http://ibmmainframes.com/viewtopic.php?t=43697&postdays=0&postorder=asc&start=0
http://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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Oct 09, 2014 5:40 pm    Post subject: Reply to: Change field case programmatically
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 09, 2014 6:21 pm    Post subject: Reply to: Change field case programmatically
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: 28
Location: USA

PostPosted: Thu Oct 09, 2014 6:59 pm    Post subject: Re: Reply to: Change field case programmatically
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Oct 09, 2014 7:58 pm    Post subject: Reply to: Change field case programmatically
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: 28
Location: USA

PostPosted: Thu Oct 09, 2014 8:02 pm    Post subject: Re: Reply to: Change field case programmatically
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Oct 09, 2014 8:33 pm    Post subject:
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: 28
Location: USA

PostPosted: Thu Oct 09, 2014 8:44 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Oct 09, 2014 8:51 pm    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Oct 09, 2014 10:55 pm    Post subject: Reply to: Change field case programmatically
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: 28
Location: USA

PostPosted: Thu Oct 09, 2014 11:25 pm    Post subject: Re: Reply to: Change field case programmatically
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us