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

Field Attribute change from Application program.


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
aishwarya_20

New User


Joined: 19 Nov 2008
Posts: 57
Location: pune

PostPosted: Tue Jan 20, 2009 2:14 pm
Reply with quote

Hi, I am new to IMS DC. If i want to change the field attributes from my application program then what i need to do for that. For example: if i want to Unprotect one field, which was previously declared as PROT in MFS.Then what steps i need to follow for that?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Jan 20, 2009 6:13 pm
Reply with quote

Is the field defined as MOD in your MFS? Yes, you can change the attribute bytes from your application program when sending out the message. Is the attribute field defined in working storage in your application program?
Back to top
View user's profile Send private message
aishwarya_20

New User


Joined: 19 Nov 2008
Posts: 57
Location: pune

PostPosted: Wed Jan 21, 2009 3:54 pm
Reply with quote

Yes i MFS the field is having ATTR=MOD. But i don't have any idea about defining attribute field in working storage section. I have a few queries regarding that:-
1. What should be the picture clause for Attribute field
2. Is this attribute field same variable which is declared for that field on screen or for attribute we need to declare separate field in program as well as in MOD or only in program?
3. What does ATTR=YES signify?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Jan 21, 2009 4:01 pm
Reply with quote

If your MFS has ATTR=YES, then you add 2 bytes to the screen area to allow. In your program, you will then define that as a separate field before the data field.
Back to top
View user's profile Send private message
aishwarya_20

New User


Joined: 19 Nov 2008
Posts: 57
Location: pune

PostPosted: Wed Jan 21, 2009 4:06 pm
Reply with quote

Thanks for your reply. If ATTR is not YES then we can not change the attribute?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Jan 21, 2009 6:04 pm
Reply with quote

The ATTR is defined on the DFLD. You should research what those options are. For instance a field can be modifiable, but you may not enter it on the screen - ATTR=(MOD,PROT,NODISP)
ATTR=(PROT) ATTR=(PROT,HI,NUM) or ATTR=(MOD,NUM)

So, think about these. A DFLD that is defined without a name is normally a literal 'PRESS PF5 TO CANCEL ' ,POS=(22,02),ATTR=(PROT). Do you notice a LTH defined in that statement?
Back to top
View user's profile Send private message
aishwarya_20

New User


Joined: 19 Nov 2008
Posts: 57
Location: pune

PostPosted: Thu Jan 22, 2009 10:08 am
Reply with quote

Yes i could see the LTH defined in that DFLD statement. I guess this is the length of the field.
Back to top
View user's profile Send private message
aishwarya_20

New User


Joined: 19 Nov 2008
Posts: 57
Location: pune

PostPosted: Thu Jan 22, 2009 2:18 pm
Reply with quote

The ATTR is also defined in MFLD. Here for Output type of MFLD can we define ATTR=YES.

As you wrote "The ATTR is defined on the DFLD. You should research what those options are. For instance a field can be modifiable, but you may not enter it on the screen - ATTR=(MOD,PROT,NODISP)
ATTR=(PROT) ATTR=(PROT,HI,NUM) or ATTR=(MOD,NUM) "


I did not get answer of my question my only query was:please tell me the steps for changing the attribute of field from application program. Can anyone answer this.

I tried to find out this but could not find the solution.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Jan 22, 2009 7:21 pm
Reply with quote

Take a look at your output message in working storage. The attribute field will be defined immediately BEFORE the data field. Make sure that your output message length is increased if you are adding anything. It is not a good idea to always send maximum message length - it bogs down the system. An attribute bytes is defined in your output area as Pic S9(04) comp.

Set up an 01 level named attribute-byte-values. You will then define the attribute bytes as 05 levels - here are a couple:

05 protect-alpha pic 9(4) comp value 226.
05 unprotect-numeric-mod pic 9(4) comp value 211.
05 unprotect-alpha-mod-curs pic 9(5) comp value 49347.
05 unprotect-num-hi-mod-curs pic 9(5) comp value 49371.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Jan 22, 2009 8:40 pm
Reply with quote

I looked at this again. As you are editing your screen, set the attribute byte for each field in error. If you have fields in error, you will want to set the cursor at that field and highlight it. For instance you field is ws-out amt. The attribute preceding this is ws-out-amt-attr. You will want to move unprotect-num-hi-mod-curs to ws-out-amt-attr. Just making sure that I explained this.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Fri Jan 23, 2009 2:14 am
Reply with quote

POS=(22,02) - this is NOT the length - this is line 22 starting position 2 on your screen. Literals are not modifiable and thus do not need a length.
Back to top
View user's profile Send private message
aishwarya_20

New User


Joined: 19 Nov 2008
Posts: 57
Location: pune

PostPosted: Tue Jan 27, 2009 2:13 pm
Reply with quote

Thanks Sandy, Now i got a clear picture.
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top