Try adding unalloc keyword: 'FREE FILE DD(FILEOUT) UNALLOC'
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of
Scott Ford
Sent: Monday, February 28, 2011 3:57 PM
To: [email protected]
Subject: BPXWDYN
I am trying to to the following in A LE Cobol 4.1 program, a
Hi all:
I am trying to to the following in A LE Cobol 4.1 program, a STC . I have
specified a Select for the file ....
SELECT FILEOUT
ASSIGN TO FILEOUT
ORGANIZATION IS SEQUENTIAL
FILE STATUS IS FILEOUT-STATUS.
I build the BPXWDYN call like this:
*** Working Storage ***
01 DYNAM-CONSTANTS.
05 BPXWDYN-PGM PIC X(8) VALUE 'BPXWDYN'.
01 BPXWDYN-PARM.
10 BPXWDYN-PARM-LEN PIC S9(4) BINARY VALUE +100.
10 BPXWDYN-PARM-TXT PIC X(100).
01 DYNSYSOUT-TEMP.
10 FILLER PIC X(18) VALUE ' ALLOC DD(FILEOUT)'.
10 FILLER PIC X(8) VALUE ' SYSOUT('.
10 SYSOUTCL PIC X VALUE SPACE.
10 FILLER PIC X(10) VALUE ' MSG(WTP)'.
10 FILLER PIC X(32)
VALUE ' FREE DD(FILEOUT) SPIN(UNALLOC)'.
I fill in the SYSOUTCL variable via a parameter...
I string the allocate like this:
STRING DYNSYSOUT-TEMP
DELIMITED BY SIZE
INTO BPXWDYN-PARM-TXT
END-STRING
CALL BPXWDYN-PGM USING BPXWDYN-PARM-TXT
The allocate works fine , no issue..
I write to the fileout no problem, works fine.
I issue a free like this:
STRING ' FREE DD(FILEOUT) '
DELIMITED BY SIZE
INTO BPXWDYN-PARM-TXT
CALL BPXWDYN-PGM USING BPXWDYN-PARM-TXT
The rc says 0 it worked, But I look at the STC and the 'DD' is still allocated.
Did the free not unallocate the 'DD'. I want a sysout dataset to be opened and
closed multiple times via a command.
Thanks all for any help
Scott J Ford
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html