Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1027
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: 2435
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: 1027
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: 2435
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us