|
|
| Author |
Message |
A Selvakumar
New User
Joined: 25 May 2009 Posts: 9 Location: INDIA
|
|
|
|
Hi,
I have the following scenario. The REXX program is executing a COBOL program and this COBOL program need to use files.
Is it possible to use it? If so how?
When I try to execute the Cobol thru the REXX, I am getting the file status as 35.
Here is the code.
ADDRESS TSO "ALLOCATE DDNAME(FORMUSER) DSNAME("DATASET1") OLD"
ADDRESS TSO "ALLOCATE DDNAME(MOVTOS) DSNAME("DATASET2") OLD"
"ISPEXEC SELECT PGM(B099M601)"
Any help is Welcome! |
|
| Back to top |
|
 |
References
|
|
 |
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 4249 Location: Atlanta, GA
|
|
|
|
| Did you look up the file status 35 either in the manual or via the sticky? And posting the REXX code doesn't really help without the COBOL file assignments, you know. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 3385 Location: germany
|
|
|
|
| Quote: |
An OPEN statement with the INPUT, I-O,
or EXTEND phrase was attempted on a
non-optional file that was not present. |
how do you expect us to determine why the COBOL program is returning a file_status of 35 when- you do not inform us of the rc for the alloc in your rexx
- you have not provided the select, fd or I/O statements from the COBOL program
- you have not provided the complete error message which would have indicated which file returned the 35 status
?????????????
by the way, you are invoking a COBOL program from a REXX Script; the OP-SYS executes the program. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 3385 Location: germany
|
|
|
|
| my money is on a bad alloc. |
|
| Back to top |
|
 |
A Selvakumar
New User
Joined: 25 May 2009 Posts: 9 Location: INDIA
|
|
|
|
Hi,
I am getting the file status '35' for the FORMUSER file.
The RC from the REXX is zero after the allocation.
Here is the code from the Cobol program.
SELECT FORMUSER-FILE ASSIGN TO FORMUSER
ORGANIZATION IS INDEXED
ACCESS IS RANDOM
RECORD KEY IS FU-A-KEY
FILE STATUS IS FU-STATUS.
FD FORMUSER-FILE.
01 FORMUSER-RECORD.
03 FORMUSER-A-RECORD.
05 FU-A-KEY.
10 FU-A-REC-TYPE PIC X(01).
10 FILLER PIC X(06).
10 FILLER PIC X(05).
05 FU-A-DATA.
10 FU-A-SYS-NAME PIC X(06) OCCURS 10 TIMES.
10 FILLER PIC X(2460).
Procedure division code
MOVE 'A' TO FU-A-REC-TYPE
READ FORMUSER-FILE.
I am getting the error '35' while doing the open itself. I have seen the meaning of filestatus '35'.
The point here is, I am doing the allocation in the REXX code itself and then I am calling the Cobol program. This Cobol program is trying to use the same file.
Will this work?
Any help is welcome! |
|
| Back to top |
|
 |
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 4249 Location: Atlanta, GA
|
|
|
|
| Out of curiosity: you know that the file status 35 refers to the OPEN statement, yet that is the one piece of COBOL code you do NOT provide. Why? |
|
| Back to top |
|
 |
|
|