Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Allocate a tape file inside a PL/I program using BPXWDYN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu Mar 03, 2011 11:15 pm    Post subject: Allocate a tape file inside a PL/I program using BPXWDYN
Reply with quote

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
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1049
Location: Oostende, Belgium

PostPosted: Fri Mar 04, 2011 12:51 am    Post subject:
Reply with quote

Have you already tried dynamic allocation using the TITLE option as per Chapter 8 of the PL/I Programming Guide?
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Mar 04, 2011 12:54 am    Post subject:
Reply with quote

Not yet used.
To read this evening and to try tomorrow.

Thanks

Pierre
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2441
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 04, 2011 12:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1049
Location: Oostende, Belgium

PostPosted: Fri Mar 04, 2011 1:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2441
Location: Netherlands, Amstelveen

PostPosted: Fri Mar 04, 2011 2:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Mar 05, 2011 3:44 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 0 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us