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

Issue with the length attribute filed to check data modified


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Thu Aug 04, 2011 10:53 pm
Reply with quote

Hi,

I have CICS sceen as below.

ACTN Acct-code D-CODE Eff-start date
----- ---------- --------- MM/DD/YYYY
----- ---------- --------- MM/DD/YYYY
----- ---------- --------- MM/DD/YYYY
----- ---------- --------- MM/DD/YYYY


the map is getting populated from the table.


I have logic coded in the program, if the user override the the EFF-START-DATE and ACTN=M, i am checking the length of Eff-start date is > 0, but even if i have not modied the date filed i am getting length of 10 bytes in length filed and hence the logic is not working.
Attributes of length field are UNP NOR TU

Could anybody please suggest me the way to handle this logic?

Thanks,
Amsar
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Aug 04, 2011 10:59 pm
Reply with quote

are you moving low values to your output map area before populating the fields ?

somewhere in your logic , you must be setting the attribute to an FSET condition.

I would walk your transaction through CEDF debug and when stopped at send map command, look in working storage for actual hex' value of attribute related to each occurance of date fields
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Thu Aug 04, 2011 11:18 pm
Reply with quote

No i am replacing the low-values by spaces before sending the map.

Thnks....
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Thu Aug 04, 2011 11:22 pm
Reply with quote

Sorry... i misunderstood you question..

Yes.. First time only while before sending the map i am populating the output fields with LOW-VALUES.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 04, 2011 11:41 pm
Reply with quote

Quote:
i am checking the length of Eff-start date is > 0
What is the precise code you are using for this? Use the Code tag when posting it to retain spacing and so forth.
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Fri Aug 05, 2011 12:12 am
Reply with quote

I am using below code:

Code:
IF (GXXX-BEGEFFDTL(CNT1) > 0)                         
   IF (GXXX-BEGEFFDTI (CNT1) = WS-NEXT-DATE)           
       CONTINUE                                       
   ELSE                                               
       ADD +1                   TO CA-MOD-ERR           
       MOVE DFHRED         TO GMXX-BEGEFFDTC (CNT1)
       MOVE -1                  TO GMXX-BEGEFFDTL (CNT1)
       MOVE '9683'            TO INFO-NEXT-KEY       
       PERFORM 7000-SCREEN-MSG THRU 7000-EXIT         
          UNTIL INFO-NEXT-KEY = SPACES                 
   END-IF                                             
END-IF.


GMB9-BEGEFFDT is the date field i am talking about.

Thnks...
Back to top
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Fri Aug 05, 2011 12:14 am
Reply with quote

Quote:
GMB9-BEGEFFDT is the date field i am talking about.


Please read as.....GXXX-BEGEFFDT is the date field i am talking about.
Back to top
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Fri Aug 05, 2011 1:28 pm
Reply with quote

Maybe the modified data tag is set. This would cause every field to be flagged as if it has been modified by the user. MDT can be set by using the FSET paramater in the DFHMDF macro and using the FSET paramater in the EXEC CICS SEND command.

To be more independent from the map definition I propose to check the field by a combination of length attribute and real content.

For example:
Code:
IF (GXXX-BEGEFFDTL(CNT1) > 0) AND (GXXX-BEGEFFDTIL(CNT1) NOT = SPACES)
   IF (GXXX-BEGEFFDTI (CNT1) = WS-NEXT-DATE)           
       CONTINUE                                       
   ELSE                                               
       ADD +1                   TO CA-MOD-ERR           
       MOVE DFHRED              TO GMXX-BEGEFFDTC (CNT1)
       MOVE -1                  TO GMXX-BEGEFFDTL (CNT1)
       MOVE '9683'              TO INFO-NEXT-KEY       
       PERFORM 7000-SCREEN-MSG THRU 7000-EXIT         
          UNTIL INFO-NEXT-KEY = SPACES                 
   END-IF                                             
END-IF.

Hope this helps
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Tue Aug 09, 2011 5:34 am
Reply with quote

Problem could be as Stefan suggests.

Please post the DFHMSD statement for your map and the related
DFHMDF statement for the field you are having problems with.

AND post the exec cics send statement.


In addition, as a good coding practice, you should never move spaces to entire map area.

[/quote]
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Tue Aug 09, 2011 5:38 am
Reply with quote

I notice your coding example reflects indexing , are you generating map with the occurs clause or do you manually redefine the map in your
program?
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top