Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Send/recevie cobol array in CICS Start/Retrieve command?
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    Post subject:
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    Post subject:
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: 7914
Location: Bellevue, IA

PostPosted: Tue Oct 19, 2010 10:31 pm    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Oct 19, 2010 11:07 pm    Post subject:
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    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 20, 2010 4:00 pm    Post subject: Reply to: Send/recevie cobol array in CICS Start/Retrieve co
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 20, 2010 4:25 pm    Post subject: Reply to: Send/recevie cobol array in CICS Start/Retrieve co
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us