View previous topic :: View next topic
|
Author |
Message |
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
I am lost in dynamic allocation of a tape file inside a PL/I program.
I am using either BPXWDYN or DYNALLOC and none was successfully processed.
Something like this should be OK and enough.
Code: |
ALLOC_STR = ' ALLOC FI(ALPHA) DA(my.tape.file) SHR REUSE'
CALL BPXWDYN(ALLOC_STR)
|
But failed with code error 356 via SHORTRC. ( normal error code something like 327546432 )
I added UNIT(TAPE). Reran. No way
When I give the information in the JCL, just like this :
Code: |
//ALPHA DD DISP=SHR,DSN=my.tape.file
|
: it is working.
I went through the whole set of attributes of BPXWDYN but nothing helped me.
Question : is such allocation of tape file possible inside a PL/I program? Bug or not? APAR?
Thanks
Pierre |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Have you already tried dynamic allocation using the TITLE option as per Chapter 8 of the PL/I Programming Guide? |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Not yet used.
To read this evening and to try tomorrow.
Thanks
Pierre |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
You could try the following :
Code: |
DCL PLIRETV BUILTIN;
DCL BPXWDYN EXTERNAL ENTRY OPTIONS(ASM INTER RETCODE);
DCL ALLOC_STR CHAR(100) VAR
INIT('ALLOC FI(SYSIN) DA(MY.DATASET) SHR');
FETCH BPXWDYN;
CALL BPXWDYN(ALLOC_STR);
|
|
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
PeterHolland wrote: |
You could try the following :
Code: |
DCL PLIRETV BUILTIN;
DCL BPXWDYN EXTERNAL ENTRY OPTIONS(ASM INTER RETCODE);
DCL ALLOC_STR CHAR(100) VAR
INIT('ALLOC FI(SYSIN) DA(MY.DATASET) SHR');
FETCH BPXWDYN;
CALL BPXWDYN(ALLOC_STR);
|
|
And how does this differ from what the OP posted? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
prino wrote: |
PeterHolland wrote: |
You could try the following :
Code: |
DCL PLIRETV BUILTIN;
DCL BPXWDYN EXTERNAL ENTRY OPTIONS(ASM INTER RETCODE);
DCL ALLOC_STR CHAR(100) VAR
INIT('ALLOC FI(SYSIN) DA(MY.DATASET) SHR');
FETCH BPXWDYN;
CALL BPXWDYN(ALLOC_STR);
|
|
And how does this differ from what the OP posted? |
At least 4 statements. And to me that is a difference. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
I abandonned BPXWDYN ( maybe when I find time I will make a set of tests.
Now I am using a version of DYNALOC program ( ASM with call to SVC99 ) : after several tries, I reach the correct parameter list to provide :
fields of ALLOC01
REQUEST = 'ALLOC'
DDNAME = 'ALPHA'
DSN ='my.tape.file'
STATUS = 'SHR'
NDISP = 'KEEP'
CDISP = 'KEEP'
RECFM = 'FB'
UNIT = 'K'
Then CALL DYNALOC(ALLOC01);
I am not sure the version of DYNALOC I am using : from CBTTAPE, or a variation.
Anyway the main information to give looks like this.
Thanks for your time.
Nice week-end
Pierre |
|
Back to top |
|
|
|