IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Send/recevie cobol array in CICS Start/Retrieve command?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravidhiman

New User


Joined: 09 Oct 2006
Posts: 23
Location: London, UK

PostPosted: Tue Oct 19, 2010 10:05 pm
Reply with quote

Hello All,

I want to pass the cobol array using CICS start command and also want to retrieve the same cobol array in another program.


I have following structure in program A :

03 WS-AAA-TBL OCCURS 30 TIMES
INDEXED BY ACC1-INDEX.
15 WS-AAA-TBL-CTRY PIC X(2).
15 WS-AAA-TBL-INSTT PIC X(4).
15 WS-AAA-TBL-NO PIC X(35).
15 WS-AAA-TBL-PROD-TYP PIC X(2).
15 WS-AAA-TBL-BOS-AC-TYP PIC X(3).
15 WS-AAA-IDAY-RTE-COD PIC X(7).

I want to use the same following structure in program B.

03 WS-BBB-TBL OCCURS 30 TIMES
INDEXED BY ACC2-INDEX.
15 WS-BBB-TBL-CTRY PIC X(2).
15 WS-BBB-TBL-INSTT PIC X(4).
15 WS-BBB-TBL-NO PIC X(35).
15 WS-BBB-TBL-PROD-TYP PIC X(2).
15 WS-BBB-TBL-BOS-AC-TYP PIC X(3).
15 WS-BBB-IDAY-RTE-COD PIC X(7).

Can i send and receive the array from progam A to program B using normal START and RETRIEVE command(Like given below)?
Program A
EXEC CICS START TRANSID(XXXX)
FROM (WS-AAA-TBL)
LENGTH (LENGTH OF WS-AAA-TBL)
RESP (WS-EIBRESP)
END-EXEC.

Program B
EXEC CICS
RETRIEVE INTO (WS-BBB-TBL)
LENGTH (LENGTH OF WS-BBB-TBL)
RESP (WS-EIBRESP)
END-EXEC

Will the values of WS-AAA-TBL copy to WS-BBB-TBL in program B?

Please help me.

Thanks
Ravi
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 19, 2010 10:15 pm
Reply with quote

are there any restrictions on the level numbers of the FROM and INTO data-area?

while you are looking up the answer to that question in the manual,
you can also read about data transfer with the START command and how it works.
ravidhiman wrote:
Please help me.


help yourself, read the manual.

or simply think. what is the difference between a structure containing an
internal cobol table and just a bunch of fields?
Back to top
View user's profile Send private message
ravidhiman

New User


Joined: 09 Oct 2006
Posts: 23
Location: London, UK

PostPosted: Tue Oct 19, 2010 10:28 pm
Reply with quote

There is no restrictions on the level numbers of the from and into data area.
Could you please name any good cics manual? I will check.
I already checked 3 manuals before posting here? I checked Murach's CICS for the COBOL Programmer and 2 IBM CICS manual. But could not find the answer for this.

I will check few more manuals.

Thanks.
Ravi Dhiman
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 19, 2010 10:31 pm
Reply with quote

Hint: the manual says about RETRIEVE:
Quote:
Description

The RETRIEVE command retrieves data stored by expired START commands. It is the only method available for accessing such data.
so ask yourself if your START command has expired.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 19, 2010 10:34 pm
Reply with quote

sounds as if you are left with a really unpleasant option
of coding and testing it yourself.
Back to top
View user's profile Send private message
ravidhiman

New User


Joined: 09 Oct 2006
Posts: 23
Location: London, UK

PostPosted: Tue Oct 19, 2010 10:39 pm
Reply with quote

If i had got the testing option, I would be very happy. Unfortunately I can not test this program.

I need to wait for some other programs to be ready for complete testing.

Thanks
Ravi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 19, 2010 11:07 pm
Reply with quote

Hello,

Quote:
I need to wait for some other programs to be ready for complete testing.
Not really. . .

Suggest you write a tiny companion program so you can test your code. . .
Back to top
View user's profile Send private message
ravidhiman

New User


Joined: 09 Oct 2006
Posts: 23
Location: London, UK

PostPosted: Wed Oct 20, 2010 2:09 pm
Reply with quote

Because of some restrictions the testing cannot be done at the moment for any program.We will have to wait until all the programs ready and testing process start. Otherwise I wud have quickly tested this program by writing a tiny program.

Thanks
Ravi
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 20, 2010 4:00 pm
Reply with quote

When you can test this, you'll need a GROUP level above the OCCURS level and you'll START "FROM" and RETRIEVE "INTO" using this GROUP level.

The maximum length value for START, RETRIEVE, etc is 32763, expressed as a signed binary-halfword.

If the length value exceeds 9999 and your compiler does NOT support COMP-5, then re-compile the program using TRUNC(BIN).

Otherwise, express the length as COMP-5.

Bill
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 20, 2010 4:25 pm
Reply with quote

Forgot to say the INDEX values are NOT passed in the "FROM" area and LENGTH OF WS-AAA-TBL will only resolve as 53 (length of a single entry). This is the reason for the GROUP level and use the LENGTH OF THE GROUP LEVEL instead.

Makes things easier....

Bill
Back to top
View user's profile Send private message
ravidhiman

New User


Joined: 09 Oct 2006
Posts: 23
Location: London, UK

PostPosted: Wed Oct 20, 2010 7:06 pm
Reply with quote

Many Thanks Bill,

I will use group level above the occurs level. We are going to test this on Friday. Soon I will post the result here.

Regards
Ravi
Back to top
View user's profile Send private message
ravidhiman

New User


Joined: 09 Oct 2006
Posts: 23
Location: London, UK

PostPosted: Wed Oct 27, 2010 4:59 pm
Reply with quote

Hello All,

Today, I tested as I mentioned in my earlier posts. The Data(Array of records) passed succssfully and correctly retrieved by that called transaction(program).

Thank everybody for the help.

Regards
Ravi Dhiman
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top