Vertical Array on CICS

About CICS and BMS - In this Mainframe Forum - You can post your queries on CICS

Moderators: DikDude, Natarajan, Moderator Group

Post Reply
sreekanth1984
Member
Posts: 12
Joined: Mon Oct 12, 2009 12:41 pm

Vertical Array on CICS

Post by sreekanth1984 » Thu Oct 15, 2009 1:19 pm

How to define a vertical array in CICS screen?

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Oct 15, 2009 2:24 pm

Even though the display is vertical, data sent to the screen is just one long data stream.

Code: Select all

<-----&#40;1,1&#41;  ----&#40;1,2&#41;> &#40;1&#41;
<-----&#40;2,1&#41;  ----&#40;2,2&#41;> &#40;2&#41;
<-----&#40;3,1&#41;  ----&#40;3,2&#41;> &#40;3&#41;
<-----&#40;4,1&#41;  ----&#40;4,2&#41;> &#40;4&#41;
<-----&#40;5,1&#41;  ----&#40;5,2&#41;> &#40;5&#41;
<-----&#40;6,1&#41;  ----&#40;6,2&#41;> &#40;6&#41;
loop and increment the first index instead of the second. The second would remain constant (either 1 for the first column or 2 for the second)
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

sreekanth1984
Member
Posts: 12
Joined: Mon Oct 12, 2009 12:41 pm

Post by sreekanth1984 » Thu Oct 15, 2009 4:05 pm

Thanks for your quickly response.

But, can you explain how to define in BMS MACRO or how to define this field in symbolic map....

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Oct 15, 2009 4:36 pm

same way you would create a 'horizontal array'.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

sreekanth1984
Member
Posts: 12
Joined: Mon Oct 12, 2009 12:41 pm

Post by sreekanth1984 » Thu Oct 15, 2009 4:51 pm

FNAME DFHMDF POS=(9,22),LENGTH=8,
ATTRB=(UNPROT,BRT),
INITIAL='---------',
PICOUT='X(8)',
Above is my BMS MACRO definition for FNAME field. This FNAME data I want to display Five (rows) times on my screen. Correspondingly I've used occurs 5 times in my symbolic map for the output field(FNAMEO). I compiled my program and ran the same. But I'm getting output as below.

FirstName
ABCDEFGH BBSDEFGH AJDKFLSD ASDFKGLD ASGDJFLS
My expected out put is below.

FirstName
ABCDEFGH
BBSDEFGH
AJDKFLSD
ASDFKGLD
ASGDJFLS

To get the desired output do I need to change my program logic or any change in the definition of field variable....?

Please feel free to respond for this....

Thanks,
Srikanth

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Tue Oct 20, 2009 2:38 pm

Hi Srikanth,

As per the information, i have with me.
using OCCURS, you wont get vertical fields in BMS map.

If you want all fields in one column to be in a array structure
to access from cobol program. do following.

1. define the fields in BMS map with same name
2. after creating the symbolic map. modify symbolic map
to define array on these fields using REDEFINES clause.
3. now , you can use these arrays to refer the fields in BMS which are defined with
same name.
Natarajan
Chennai

sreekanth1984
Member
Posts: 12
Joined: Mon Oct 12, 2009 12:41 pm

Post by sreekanth1984 » Tue Oct 20, 2009 6:28 pm

Hi Natarajan,

Thanks for your detailed explaination....

As you said I could not create a vertical array through occurs clause in BMS map. And I tried using OCCURS clause to my output field varibles in symbolic map, even it's creating a horizontal array.
Please don't mind to provide me a sample symbolic map definition for the same....

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others