View previous topic :: View next topic
|
Author |
Message |
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
No i am replacing the low-values by spaces before sending the map.
Thnks.... |
|
Back to top |
|
|
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
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 |
|
|
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
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 |
|
|
Stefan
Active User
Joined: 12 Jan 2006 Posts: 110 Location: Germany
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
|