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
 

 

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: 10231
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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