IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Dynamically allocate new dataset in cobol.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Jun 21, 2009 8:38 pm
Reply with quote

Hi,
I want to create dataset in COBOL. I am using program BPXWDYN to do it.

But am not getting how to pass disp parameter if I want disp as (NEW,CATLG,DELETE).

Currently my program is like this,
Code:

       WORKING-STORAGE SECTION.                                     
       01  SUB-PGM               PIC X(8)   VALUE 'BPXWDYN '.       
       01  ALLOC-INVOER-CMD.                                       
           05  FILLER            PIC X(50)  VALUE                   
           ' ALLOC DD(FIN) DSN(EX.DEX006.DALLOC) RECFM(F,B) '.     
           05  FILLER            PIC X(50)  VALUE                   
           ' LRECL(80) TRACKS SPACE(5,2) NEW                '.     
       01 COMMAND-STRING.                                           
           05 C-S-LEN            PIC S9(4)   BINARY VALUE +100.     
           05 C-S-DATA.                                             
               07 FILLER         PIC X(100).                       
.
.
       PROCEDURE DIVISION.
       BEGIN.                                           
           MOVE ALLOC-INVOER-CMD TO C-S-DATA.           
           CALL SUB-PGM USING COMMAND-STRING.           

By this Dataset is getting deleted at end.
Code:

IGD101I SMS ALLOCATED TO DDNAME (FIN     )                                     
        DSN (EX.DEX006.DALLOC                            )                     
        STORCLAS (ALLSTD) MGMTCLAS (B2WFYP) DATACLAS (PSM#FB)                   
        VOL SER NOS= D1GE55                                                     
IEF142I DEX006R STEP1 - STEP WAS EXECUTED - COND CODE 0000                     
IEF285I   DEX006.DEX006R.JOB09142.D0000102.?           SYSOUT                   
IGD104I EX.DEX006.NOMAD.LOAD                         RETAINED,  DDNAME=STEPLIB 
IEF285I   DEX006.DEX006R.JOB09142.D0000101.?           SYSIN                   
IGD105I EX.DEX006.DALLOC                             DELETED,   DDNAME=FIN     


I tried giving NEW CATLOG DELETE instead of NEW, but it is getting error...
Any help on this?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Jun 21, 2009 8:52 pm
Reply with quote

Have you tried NEW CATALOG?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Jun 21, 2009 8:55 pm
Reply with quote

Yes I did. It is failing with
Code:

DEX006R STEP1 - STEP WAS EXECUTED - COND CODE 4067       
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Jun 21, 2009 8:58 pm
Reply with quote

Quote:
Have you tried NEW CATALOG?


Thanks Robert.

It worked now.
It was typo. I gave CATLG instead of CATALOG previously.. icon_sad.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 22, 2009 2:09 am
Reply with quote

Glad to hear it's working.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Jun 22, 2009 8:13 am
Reply with quote

I took help from below link
ftp.software.ibm.com/s390/zos/tools/bpxwdyn/bpxwdyn.html

I don't know who can do it but It would have been very good if Examples of Calling BPXWDYN from COBOL also get added along with C and REXX.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jun 22, 2009 11:02 am
Reply with quote

Quote:
I don't know who can do it
What does that mean? icon_smile.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Jun 22, 2009 11:06 am
Reply with quote

Quote:

Quote:
I don't know who can do it
What does that mean?


Who responsible for creating\updating such ibm documentation...
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 22, 2009 4:37 pm
Reply with quote

Depending upon your site support contract, you may be able to submit a PMR to IBM to have the documentation changed. Otherwise, you may be able to submit a request through the IBM web site. In neither case would I expect any change to occur anytime soon.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jun 22, 2009 8:10 pm
Reply with quote

Hello,

The link you posted is dated 2000. . .

However, it did have the e-addr of the author.

You might try an e-mail asking for guidance - might receive a quicker reply than submitting an enhancement request . . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top