Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Display Date Field

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

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Oct 06, 2010 1:20 am    Post subject: Display Date Field
Reply with quote

Hi,
I have the following requirement:
Display the date in the format MM/DD/CCYY.
The Map Field has a length of 10 bytes.
The same map will be used for View and Change.
For view, this field will be protected and for Change it will be unprotected.

During Change, the '/' should be always protected and user should be able to tab from Month to Date and to year.
Now, I have usually displayed the Date fields as follows:
MM / DD / CCYY which is 14 bytes and never as MM/DD/CCYY.
This is my problem.
Also, I cannot increase the lenght of the field due to restrictions on the map.

The other option I have is to display the date during Change as follows:
MM DD CCYY

But this will not meet the requirement during View as the date will not be populated with '/'.
Is there any solution? Or am I sounding confused icon_lol.gif
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Wed Oct 06, 2010 1:40 am    Post subject: Reply to: Display Date Field
Reply with quote

Quote:
During Change, the '/' should be always protected and user should be able to tab from Month to Date and to year.

the approach is just plain wrong...
You cannot have in this case a single field but 5 of them
3 for the input fields 2 for the separating slashes
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Oct 06, 2010 1:51 am    Post subject: Reply to: Display Date Field
Reply with quote

Hi Enrico,
You are right. We will need 5 fields and also the 5 fields cannot settle in the 10-byte field.
Hence, the approach I think is to display the date without slashes "09 30 2010" whenever the field has to be unprotected but display as "09/30/2010" when protected.
So, this would mean to define 3 fields in the map(A,b and C) when the date has to be unprotected and 1 field (D) when the has to be protected. Both fields have to be defined at same position of the map.
But the problems come when we are setting the attributes of the map.
I am not sure if there is a way by which we can suppress (i.e. do not display) the field D when A, B and C have to be displayed and vice-versa.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Oct 06, 2010 1:59 am    Post subject:
Reply with quote

Hello,

Use the same field definition for both cases.

When the field is unprotected, the code must make sure the date input is valid.

If you really want to be helpful to the user, you allow mmddccyy or mm/dd/ccyy or or mm dd ccyy when a date is modified. Even if it is presented to the user as mm/dd/ccyy. It is a tiny bit of code and the date must be validated anyway . . .
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Oct 06, 2010 2:11 am    Post subject:
Reply with quote

Hi Dick,
I agree with your approach and had given a thought about it. I have kept this as the last option in case I do not find anything else.
Thanks!!
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 display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us