View previous topic :: View next topic |
Author |
Message |
ramlak Beginner
Joined: 17 Apr 2007 Posts: 27 Topics: 6
|
Posted: Wed May 16, 2007 9:40 am Post subject: Repeating a line of data in BMS |
|
|
Hi all,
I was jus searching for my doubt but i couldnt get good result...
My query is
Lets say i have a map whose field has no other attributes..
just the length is 70 and the there are 15 lines to be displayed in the screen using this map.
Is there anyway to access these map fields as if accessing the table...
even when sending map it becomes easier to use perform and populate
the map and send it ??
Pl advise. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed May 16, 2007 9:57 am Post subject: |
|
|
ramlak,
The 15 lines is defined as 01 level with OCCURS clause. So I don't see any reason as to why you cannot use it.
ex:
Code: |
01 MAP-DATA.
02 BMSGT-MAP-FIELD OCCURS 15 TIMES.
03 SOME-FIELD PIC X(70).
DISPLAY BMSGT-MAP-FIELD (7) <<< Displays 7th line
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
ramlak Beginner
Joined: 17 Apr 2007 Posts: 27 Topics: 6
|
Posted: Wed May 16, 2007 10:09 am Post subject: |
|
|
Thanks kolusu that was quick enough.... |
|
Back to top |
|
|
ramlak Beginner
Joined: 17 Apr 2007 Posts: 27 Topics: 6
|
Posted: Wed May 16, 2007 12:40 pm Post subject: |
|
|
kolusu,
my point was to generate the MAP as DSECT with occurs in itself,
probably i assume what you have given is redefines of the copy book of the map
thats y i overlooked the thing.. |
|
Back to top |
|
|
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Wed May 16, 2007 12:46 pm Post subject: |
|
|
ramlak wrote: | kolusu,
my point was to generate the MAP as DSECT with occurs in itself,
probably i assume what you have given is redefines of the copy book of the map
thats y i overlooked the thing.. |
Look in your BMS reference manuals for the DFHMDF macro and the occurs operand. |
|
Back to top |
|
|
ramlak Beginner
Joined: 17 Apr 2007 Posts: 27 Topics: 6
|
Posted: Wed May 16, 2007 12:58 pm Post subject: |
|
|
criag,
thanks for that but what i wanted is not the repeatition of fields but the whole record (line) it self.
Thanks,
lak |
|
Back to top |
|
|
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Wed May 16, 2007 1:11 pm Post subject: |
|
|
ramlak wrote: | thanks for that but what i wanted is not the repeatition of fields but the whole record (line) it self. | I used to do that by defining empty lines on the map as a single field with the BMS occurs and a small additional one line map in the mapset that fit into the duplicated lines in the primary map.
Since the outbound map attributes do not reflect length, just start-of-field, it was easy.
It was dang hard to bring data back in from there without a mapfail. |
|
Back to top |
|
|
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Wed May 16, 2007 2:32 pm Post subject: |
|
|
ramlak wrote: | criag,
thanks for that but what i wanted is not the repeatition of fields but the whole record (line) it self.
Thanks,
lak |
Code: |
REPEATED DFHMDF POS=(04,01),
LENGTH=79,
ATTRB=ASKIP,OCCURS=8
yeilds this
02 DFHMS1 OCCURS 8 TIMES.
03 REPEATEDL PIC S9(4) COMP.
03 REPEATEDA PIC X.
03 REPEATEDO PIC X(79).
|
If that isn't what you want then you will have to explain it better. |
|
Back to top |
|
|
ramlak Beginner
Joined: 17 Apr 2007 Posts: 27 Topics: 6
|
Posted: Wed May 16, 2007 3:07 pm Post subject: |
|
|
Thats exactly what i wanted thanks for craig and everybody for taking time and effort to clarify my doubt.
Thanks,
Lak |
|
Back to top |
|
|
|
|