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
 

 

how to make editable a field in online screen

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO
View previous topic :: :: View next topic  
Author Message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Fri May 15, 2009 6:50 pm    Post subject: how to make editable a field in online screen
Reply with quote

There is a field in online screen which is always Y(yes),how I will change it to editable form(default should be Y but if they want they can make it N also)...what changes do i need to write in dialog .
Back to top
View user's profile Send private message

nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Tue May 19, 2009 10:11 am    Post subject:
Reply with quote

Hi Krushna,

If the field in non-editable in online screen, then that field in protected. Now if you want that field to be editable, then you have UNPROTECT the field.

SYNTAX to UNPROTECT a field:
Code:
MODIFY MAP CURSOR AT FIELD
<MAP FIELD> FOR (<MAP FIELD>)
ATTRIBUTES UNPROTECTED.
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue May 19, 2009 12:58 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Thanks Nelson,The same thing I also thought ,but why I m not implementing this is,there are some other fields in ONLINE which are EDITABLE also,but those fields are not UNPROTECTED.THEY ARE PROTECTED BUT how come they are coming in editable form,I analysed ,and still in the process of analysis,how they are in editable form even though protected.(like i can change there Y to N and N to Y also).

Please suggest...

~krish
Chennai
Back to top
View user's profile Send private message
Chinnadu

New User


Joined: 05 Mar 2009
Posts: 42
Location: Hyderabad

PostPosted: Tue May 19, 2009 3:04 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Try and see 'Field definition' of the required map field. It might be unprotected for the remaining fields that you are working on.

Unprotected (/) . . . . . / Required (/). . . . . . _
Automatically edited (/) _ Skipped by tab key (/) _
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue May 19, 2009 4:50 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Hi Chinnadu,its already unprotected in map structure,all the fields which accept value from end user are unprotected,still someme fields are editable and some of them are non editable...I think its because we are hardcoding that(moving Y or N to that field to show that one)
previously this field which i m trying to make editable was coming in editable mode but there was no default value Y for that.
now I moved Y to that variable whatever may be the condition.now our purpose is fulfilled,its always coming Y,but not in a editable field where as USER needs it in a editable mode with Y as default always,if he wants he can change it to N also..

ANYBODY PLEASE SUGGEST ....
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Wed May 20, 2009 9:19 am    Post subject:
Reply with quote

Hi Krish,

It is not that if you give a default value a field, it will become non-editable. Generally at the premap process, all the fields will be made protected. After which some fields will be made unprotected, as per the user requirement and input to the screen. So check whether your field get protected in this way. Or in any of the include module there will be some condition to make the field non-editable. so if you can, take a ADSO REPORT on that particular dialog, it will be very useful to do analysis. If can please try to post the code where the field is getting protected or unprotected.
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Wed May 20, 2009 4:45 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Hi Nelson,
Thanks..the code which you had given was not present there,so i added that....but still some more i have to change it seems...
one more thing is even though i m commenting all the instances of that variable in dialog,still I m getting value for that field as Y,I have commented all the instances except the declaration.....why,i dunno...the main purpose has been solved that watever may be the codition it sud be Y,that is coming now,but that usd be in a editable...my struggling is there....
Back to top
View user's profile Send private message
sudharsan.soundararajan
Warnings : 1

New User


Joined: 15 Oct 2008
Posts: 17
Location: Chennai

PostPosted: Wed May 20, 2009 5:27 pm    Post subject:
Reply with quote

Hi Krish,

i just now saw the full topic. you are saying that the Field is still NON EDITABLE.. even after putting the Nelson's code in Dialog and Changing the Map Field Definitions.
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Wed May 20, 2009 6:00 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

yes sudashan,that field is unprotected in map declaration and this part of code was not there(nelson's) previously,i added that ,still non editable,but the thing is that field is editable long before bcz when i m seeing the previous cases which is from long time they r still now opening editable,i can make changes there,but with the current code its ineditable field....

now another thing is when i m creating something with my code changes its created asssigning Y to that field but when i m inquiring it again its coming as N....both at the time of creation and inquiry its non editable....

suppose the filed name is A and map name is MAP1
the main dilaogue code is:

MOVE 'Y' TO A OF MAP1.
MODIFY MAP TEMP CURSOR
AT FIELD A OF MAP1. (this is for having Y as default to that field when the screen is opened)


The called dialogue code is:
-

IF A OF Map1 EQ 'R'
DO.
MOVE 'Y' TO A OF MAp1.
END.

IF A OF MAP1 NE 'Y' AND
A OF MAP1 NE 'N'
DO.
MOVE 'DATA INDICATOR MUST BE Y OR N' TO MSG-IND.
!KCS ADDED
MODIFY MAP TEMP CURSOR AT FIELD A OF MAP1 FOR FIELD A OF MAP1 ATTR BRIGHT.
!KCS ADDED
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Thu May 21, 2009 4:45 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Hi Nelson,
I did not put ur code in correct place,now it is editable ,but for making that field always Y i have commented whenever any N is moving to that field,so now even though it is coming as editable,if i m trying to change it to N then it is still saving Y.....
Please suggest me any other way to save 'N' there also
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Thu May 21, 2009 11:46 pm    Post subject:
Reply with quote

Hi krish,

Two question's for you. Are you storing this N to the database? If so, are you getting Y, when you try to retrieve the same record from the database next time? Please reply me.
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Fri May 22, 2009 3:48 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Ya Nelson, N is stored to the database and and when I m trying to retrieve the value after creating as Y,it is coming as Y also ,there is no concern,
Then How can i store N to that varibale ?
please suggest...
Back to top
View user's profile Send private message
sudharsan.soundararajan
Warnings : 1

New User


Joined: 15 Oct 2008
Posts: 17
Location: Chennai

PostPosted: Fri May 22, 2009 3:56 pm    Post subject:
Reply with quote

Hi Krish,

i would suggest you to check the database value before moving it to the MAP variable.

If the database value is 'N' or 'Y' move it to the screen.
If it is spaces hard code the MAP variable as 'Y'

hope this will sove your requirement.
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Fri May 22, 2009 6:09 pm    Post subject:
Reply with quote

Hi Krish,

Sudharsan's solution is correct. The problem is, irrespective of the database value you are moving Y to the screen. That is the reason, your getting Y in the screen, after storing N to the database.

So as sudharsan said check the database value before you hardcode Y to the screen.[/b]
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Fri May 22, 2009 8:10 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Sorry........

N is stored in the map only,not to the databse....and when i m retreiving the data after creating it is coming as Y..now only concern is to make it 'N'
and it sud be saved..........
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Sun May 24, 2009 11:06 pm    Post subject:
Reply with quote

We can only display the values using MAP, we cont store any value in it. Your hardcoding the map field as Y. So if you try to retrieve any record, your hardcoded value will be overwritten. So only Y will be displayed in the MAP.

Now tell your specification clearly.
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Mon May 25, 2009 7:28 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

deeply sorry for confusing..the value is stored to database only..i checked in databse,whatever i m creating ,at the time of fetching it is coming from DB ..i che checked thru OLQ..
now the requirement is:
that field should be always Y in editable mode ,but if they want sometime they will make it to N(altough not needed always)..now I m not able to save N to that variable,if possible please give a piece of code with using varibales A,B,C like tht..
Back to top
View user's profile Send private message
kcs4u2004
Warnings : 1

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue May 26, 2009 9:08 pm    Post subject: Reply to: how to make editable a field in online screen
Reply with quote

Many many thanks to Nelson,Sudarshan and all.......
I solved it along with some more modification was there....
Thank you again....... icon_smile.gif
Please help me out in the same way..
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 -> IDMS/ADSO 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 22 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 IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 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


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