VERTICAL ARRAY IN CICS

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

Moderators: DikDude, Natarajan, Moderator Group

Post Reply
nithyanandhan
Member
Posts: 15
Joined: Thu Jul 22, 2010 12:32 pm

VERTICAL ARRAY IN CICS

Post by nithyanandhan » Mon Sep 13, 2010 9:37 pm

HI, i have a problem in creating a vertical array in the map.i want 6 fields in a line to be arrayed on a single map.i already checked with the previous posts. could any one give the example which is been bending since then?
thank you in advance

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

Post by Natarajan » Tue Sep 14, 2010 6:35 am

Hi,

You can create array in the map using OCCURS option in DFHMDF macro, it will create an array in the map.

Code: Select all

marks DFHMDF  POS=
                        LENGTH=
                        OCCURS=6

Using above syntax, you can create array in the map. You can refer above field as marks(1) , marks(2).. marks(6) in your CICS program.
Natarajan
Chennai

nithyanandhan
Member
Posts: 15
Joined: Thu Jul 22, 2010 12:32 pm

vertical array in cics

Post by nithyanandhan » Tue Sep 14, 2010 11:13 am

thank u for ur reply. actually i trying to print the last ten transaction of the customer in a map. i have 6 columns in the transaction table. i want to display all in a single map. what u have mention is for field to occur in the same line . i want the sequence of fields on a line to be repeated in 10 rows in which i am going to send different data from the table for each row.
thanks in advance.i tried altering the symbolic map by including the occurs class in the input data item. but when i access those field in the program it shows the problem with the array. the error as follows
"reference modification is expected but found )"
i am getting this error moving the data into the output field of the symbolic map using array
eg. perform varying i from 1 by 1 until i>5
move "transid" to transido(i).
move "date" to trandato(i).
move "cusno" to cusnoo(i).
transido,transdato,cusnoo are output field in the symbolic map.
i didnt connect with the db2 just checking whether it works by moving simple words to that field.for this i got a error which i already mention.
can u help to satisfy that requirement? :)

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

Post by Natarajan » Tue Sep 14, 2010 4:52 pm

ok. i agree with you. it is diffiucul task to modify the symbolic map and make it work. If you want to just display the transaction, you still can use OCCURS.

Just try following...
define 79 bytes field, OCCURS 10 TIMES.
you can populate your data to local working storage and copy each record
into one occurance of this field.. it may work.. try this.
Natarajan
Chennai

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

Post by dbzTHEdinosauer » Tue Sep 14, 2010 5:47 pm

a little googling
or just plan reading the manuals
would have provided you with the BMS syntax necessary to perform this feat.
Search down in this link for Repeated fields: the OCCURS option
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

nithyanandhan
Member
Posts: 15
Joined: Thu Jul 22, 2010 12:32 pm

VERTICAL ARRAY IN CICS

Post by nithyanandhan » Tue Sep 14, 2010 10:04 pm

thank u natarajan.i already have one idea of doing it. will definitely try it out and let u know. i will try using string to populate the field.
thank u for ur reply... :)

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

Post by dbzTHEdinosauer » Tue Sep 14, 2010 10:39 pm

nithyanandhan,

normally when my posts are ignored i let it go,
since this isn't my problem - it is yours.

Had you bothered to read the link that I provided,
you will see that you don't need to implement Natarajan's solution.
you can define all (10 X 6) 60 fields in your map with an occurs
and
you can access all (10 X 6) 60 fields in your map with a subscript.

your laziness (not bothering to read the link) is appalling.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

nithyanandhan
Member
Posts: 15
Joined: Thu Jul 22, 2010 12:32 pm

Post by nithyanandhan » Thu Sep 16, 2010 8:23 am

i feel unfortunate that u got offended by activity. but for ur clarification i visited that link and as i understood i feel little comfortable with natarajan and since i have that idea already in my mind.i am just declaring 10 fields using occurs clause and loading the data from cursor into the fields using the subscript only.only difference is instead of creating each field for every automic value in the table i have created a single field per record where i can load all the value in a record into a single field using string option.the reason for this option i cannot access or load the every single record in the cursor with the single subscript .for every automic value in the data the subscript changes which makes it complicate for me to design the looping structure.
correct me if my understanding was wrong? :)

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

Post by dbzTHEdinosauer » Thu Sep 16, 2010 8:45 am

having re-read the posts, it is obvious that i mis-read the requirement.
I apologize.

the solution provided by Natarajan is the obvious (only) solution
without having a screen painter such as SDF II or a 3rd party solution.

and I apologize for not being able to provide you with a method of group occurs.
Don't have an assemblercompiler available so I can not experiment with the BMS macros.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

nithyanandhan
Member
Posts: 15
Joined: Thu Jul 22, 2010 12:32 pm

vertical array in cics

Post by nithyanandhan » Mon Sep 20, 2010 7:34 pm

its ok. i have implemented the concept ,its working good.thank u for ur replies :)

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

Post by Natarajan » Tue Sep 21, 2010 10:36 am

Did you implemented the same concept that we discussed?
Are there any changes. Please share the details.
Natarajan
Chennai

nithyanandhan
Member
Posts: 15
Joined: Thu Jul 22, 2010 12:32 pm

Post by nithyanandhan » Tue Sep 21, 2010 6:41 pm

s i exactly implemented how we discussed and its working fine. i put the fetch statement for the cursor inside a loop and moved the data from table host variables into the occurence of the current field and then i send the map i got the required output.
thanku for ur suggestion :)

nithyanandhan
Member
Posts: 15
Joined: Thu Jul 22, 2010 12:32 pm

ati in intrapartition queue

Post by nithyanandhan » Wed Sep 29, 2010 2:36 pm

hi all
can anyone tell me why ati is not possible in extrapartition queues but only in intrapartition queues.

thanks in advance :)

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