View previous topic :: View next topic
|
Author |
Message |
rajeshwarch
New User
Joined: 24 Mar 2008 Posts: 29 Location: mumbai
|
|
|
|
how to handle occur= parameter specified in DFHMDF macro. any relevant code sample |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I would suggest creating a map with an occurs= and looking at the output of the assembly process. |
|
Back to top |
|
|
rajeshwarch
New User
Joined: 24 Mar 2008 Posts: 29 Location: mumbai
|
|
|
|
ok, thanks |
|
Back to top |
|
|
raghav08 Currently Banned New User
Joined: 03 Jun 2008 Posts: 94 Location: Bangalore
|
|
|
|
Hi,
In the macro
XXXXXX DFHMDF POS=(10,1),
LENGTH=2,OCCURS=5
ATTRB=(NORM,UNPROT,FSET),....
Then in the corresponding symbolic map should be,
03 XXXXXXG OCCURS 5 TIMES.
05 XXXXXXL COMP PIC S9(4).
05 XXXXXXF PICTURE X.
05 FILLER REDEFINES XXXXXXF.
07 XXXXXXA PICTURE X.
05 XXXXXXI PIC X(2).
In the screen this field will take 10 displacement (2*5=10) as contious but with different names.
In the application program, we can use a subscript (WS-I) to refer each fileld as below,
:
MOVE 1 TO WS-I
PERFORM UNTIL WS-I > 5
MOVE XXXXXXI(WS-I) TO WS-VAR(WS-I)
ADD 1 TO WS-I
END-PERFORM.
:
I hope this will help. |
|
Back to top |
|
|
rajeshwarch
New User
Joined: 24 Mar 2008 Posts: 29 Location: mumbai
|
|
|
|
1..I have to display that 10 similar fileds of x(7) with one blank in each.
like xxxxxxx xxxxxxx xxxxxxx xxxxxxx
2.. In program depends on some condition i have to set some fileds has protected. To dynamically set this how we r move dfhbmprot to that attribute field. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
rajeshwarch wrote: |
1..I have to display that 10 similar fileds of x(7) with one blank in each.
like xxxxxxx xxxxxxx xxxxxxx xxxxxxx
2.. In program depends on some condition i have to set some fileds has protected. To dynamically set this how we r move dfhbmprot to that attribute field. |
You will get a blank between each occurrence for the attribute byte. |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
1..I have to display that 10 similar fileds of x(7) with one blank in each.
like xxxxxxx xxxxxxx xxxxxxx xxxxxxx
2.. In program depends on some condition i have to set some fileds has protected. To dynamically set this how we r move dfhbmprot to that attribute field.
ARE THESE QUESTIONS OR STATEMENTS |
|
Back to top |
|
|
raghav08 Currently Banned New User
Joined: 03 Jun 2008 Posts: 94 Location: Bangalore
|
|
|
|
Hi,
1) For your requirement, in the macro defination OCCURS=10 and LENGTH=07
2) In my previous post i have mentioned the symbolic map structure for the filelds.
If you observe "03 XXXXXXG OCCURS 5 TIMES." This is at LEVEL 03 item with OCCURS Clause. So this OCCURS is applicable for all subsidary fields also right...Means XXXXXXL,XXXXXXF,XXXXXXA and XXXXXXI all are having 5 displacements.
Suppose if you are referring First field XXXXXXI (1) then corresponding attribute filed is XXXXXXA(1)
3) So based on your application condition just move DFHBMPRO to the corresponding attribute field XXXXXXA(1/2/3/4/5) |
|
Back to top |
|
|
rajeshwarch
New User
Joined: 24 Mar 2008 Posts: 29 Location: mumbai
|
|
|
|
THANKS RAI |
|
Back to top |
|
|
|