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
 

 

Dynamically allocate new dataset in cobol.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Dynamically allocate new dataset in cobol.
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: 7988
Location: Bellevue, IA

PostPosted: Sun Jun 21, 2009 8:52 pm    Post subject:
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    Post subject:
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    Post subject:
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: 7988
Location: Bellevue, IA

PostPosted: Mon Jun 22, 2009 2:09 am    Post subject:
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    Post subject:
Reply with quote

I took help from below link
ftp://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

Senior Member


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

PostPosted: Mon Jun 22, 2009 11:02 am    Post subject:
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    Post subject:
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: 7988
Location: Bellevue, IA

PostPosted: Mon Jun 22, 2009 4:37 pm    Post subject:
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

Site Director


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

PostPosted: Mon Jun 22, 2009 8:10 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


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