View previous topic :: View next topic
|
Author |
Message |
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
sounds as if you are left with a really unpleasant option
of coding and testing it yourself. |
|
Back to top |
|
|
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
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 |
|
|
ravidhiman
New User
Joined: 09 Oct 2006 Posts: 23 Location: London, UK
|
|
|
|
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 |
|
|
|