MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamically Changing EATTR in IMS DC

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS
View previous topic :: View next topic  
Author Message
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Tue Feb 17, 2004 4:51 am    Post subject: Dynamically Changing EATTR in IMS DC Reply with quote

Does any one got an example for dynamically changing color of a field thru COBOL program. But this is'nt working. The color doesn't change

I tried this using the EATTR of MFS as follows. the field i am trying to change is POSTS(change the color to PINK).

MFS
=====
Code:

MFLD  ERRMSG,LTH=50,ATTR=NO     
MFLD  POPRFX,LTH=03,ATTR=YES     
MFLD  POSTS,LTH=09,ATTR=(YES,3) 
MFLD  LASTPO,LTH=08,ATTR=YES     



IO-AREA
======
Code:

05 ACQPOR-ERROR-MESSAGE          PIC  X(50).   
05 ACQPOR-PREFIX-ATTR                PIC  X(02).   
05 ACQPOR-PO-PREFIX                    PIC  X(01).   
05 ACQPOR-PO-STATUS-ATTR-1       PIC  X(02).   
05 ACQPOR-PO-STATUS-ATTR-2       PIC  X(02).   
05 ACQPOR-PO-STATUS-ATTR-3       PIC  X(02).   
05 ACQPOR-PO-STATUS-ATTR-4       PIC  X(02).   
05 ACQPOR-PO-STATUS                   PIC  X(01).   
05 ACQPOR-LASTPO-ATTR                PIC  X(02).   
05 ACQPOR-LAST-PO                       PIC  X(06).   


COBOL PGM
===========
Code:

 MOVE X'F3'                      TO ACQPOR-PO-STATUS-ATTR-2 
 MOVE X'F2'                      TO ACQPOR-PO-STATUS-ATTR-3 
 MOVE X'40'                      TO ACQPOR-PO-STATUS-ATTR-4 



Thanks
Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Feb 17, 2004 6:10 am    Post subject: Reply with quote

Sreejith,

Hmm your definition doesn't seem right. your code MFLD POSTS,LTH=09,ATTR=(YES,3) indicates the application program can dynamically modify the three extended attributes specified in the EATTR= operand. If this is specified, the LTH= value on the MFLD statement must be increased by 6 bytes for the modified attribute bytes. ATTR=(YES,3) in this your code lets the color, extended highlighting, programmed symbol buffer local ID, and existing 3270 attributes to be dynamically modified.

But your definition has 4 attribute bytes specified.

Check this link for Dynamic Modification of Extended Field Attributes

Also how is the DFLD for the above fields specified?

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Tue Feb 17, 2004 6:19 am    Post subject: Reply with quote

Kolusu,
Thanks for the reply. The DFLD is as follows.
Code:

ERRMSG   DFLD  POS=(03,15),LTH=50,ATTR=(PROT,HI,NOMOD,NUM)         
POPRFX   DFLD  POS=(04,13),LTH=01,ATTR=MOD                         
POSTS    DFLD  POS=(05,13),LTH=01,EATTR=(YELLOW,HD,PC'Z'),ATTR=PROT
LASTPO   DFLD  POS=(06,13),LTH=06,ATTR=PROT,EATTR=PINK             


I think the lenght is correct. The actual lenght of the POSTS field is just 1 and since I am using 3 extended attributes and one normal attribute I increaded the lenght to 9. the first attribute in the copybook is for the ATTR=YES part and next 3 are for ATTR=,3
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Tue Feb 17, 2004 7:02 am    Post subject: Reply with quote

OK ... Solved the problem. The Hex value used in the MOVE was wrong. It should be as follows
Code:


MOVE X'C2F3'                      TO ACQPOR-PO-STATUS-ATTR-2 
MOVE X'C1F2'                      TO ACQPOR-PO-STATUS-ATTR-3 
MOVE X'0040'                      TO ACQPOR-PO-STATUS-ATTR-4 
 

Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group