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

Active Member


Joined: 07 Feb 2009
Posts: 989
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: 2422
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

Active Member


Joined: 07 Feb 2009
Posts: 989
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: 2422
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm


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