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

How to concatenate datasets in JCL by overriding


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Feb 15, 2007 3:14 pm
Reply with quote

Hi

I have a proc in which my DDname has three datasets concatenated. I want to add one more dataset to this DD name along with the other three. I need to override this in the JCL. Is there anyway by which i need not use the name of all the other three datasets in the jcl(while giving the override)?
i.e by giving only the new dataset's name in the JCL override, can i concatenate it along with other datasets?
Back to top
View user's profile Send private message
prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Thu Feb 15, 2007 4:23 pm
Reply with quote

Hi Raak,

So u want to over ride a dd stmt. adn concatenate, as u have not given any dd statement let me take the IGYWCL's proc's dd name an explain

//COBOL.SYSLIB DD DSN=dataset1,disp=shr
// DD DSN=dataset2,disp=shr
// DD DSN=dataset3,disp=shr

this is used when u r copy books are in three different dataset's during compilation.


Cheer's,

Thamilzan.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Feb 15, 2007 4:28 pm
Reply with quote

raak wrote:
I have a proc in which my DDname has three datasets concatenated. I want to add one more dataset to this DD name along with the other three. I need to override this in the JCL. Is there anyway by which i need not use the name of all the other three datasets in the jcl(while giving the override)?
Can you alter the proc? If not, I do not think you can override without replacing all the others.
Back to top
View user's profile Send private message
prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Thu Feb 15, 2007 4:43 pm
Reply with quote

Quote:
I need to override this in the JCL. Is there anyway by which i need not use the name of all the other three datasets in the jcl(while giving the override)?


Oops.... Did not C this icon_eek.gif


Cheer's,

Thamilzan.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Feb 15, 2007 5:35 pm
Reply with quote

Hi

my Proc goes like this.

DDname DD dsn=xxxx.yyyyy,disp=shr
DD dsn=aaaa.bbbbb,disp=shr
DD dsn=cccc.yyyyy,disp=shr


I want to add a new dataset, say jjjj.rrrr to the DDname. I want to give an override in the JCL coz i am not supposed to change the proc.

In the JCL can i give my New dataset only and get all the four datasets concatenated?
is there any method for that?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Feb 15, 2007 5:50 pm
Reply with quote

If you can't alter the proc to create a method that will allow your single DD override, then "I do not think you can override without replacing all the others."
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 5:55 pm
Reply with quote

You don't have to code all DD-statements fully. Just the one you want to add or modify. Below an example of addition of a DD-statement.

The proc:

Code:
//MIEP PROC                                                   
//ST EXEC PGM=IEBGENER                                       
//STEPLIB DD DSN=NTSYS.IMSVS.LOADLIB,DISP=SHR                 
//        DD DSN=NASYS.IMSVS.LOADLIB,DISP=SHR                 
//SYSPRINT DD SYSOUT=*                                       
//SYSUT1 DD DUMMY                                             
//SYSUT2 DD DUMMY                                             
//SYSIN  DD DUMMY                                             
// PEND                                                       
//ST1 EXEC MIEP                                               
//ST.STEPLIB DD     <-- existing in proc                                         
//  DD                     <-- existing in proc                                   
//  DD DSN=AESCLM.P02098L.LOAD,DISP=SHR    <-- new library                 


extende:
Code:
2 //MIEP PROC                                           
  //ST EXEC PGM=IEBGENER                                 
  //STEPLIB DD DSN=NTSYS.IMSVS.LOADLIB,DISP=SHR         
  //        DD DSN=NASYS.IMSVS.LOADLIB,DISP=SHR         
  //SYSPRINT DD SYSOUT=*                                 
  //SYSUT1 DD DUMMY                                     
  //SYSUT2 DD DUMMY                                     
  //SYSIN  DD DUMMY                                     
  // PEND                                               
3 //ST1 EXEC MIEP                                       
4 ++MIEP PROC                                           
5 ++ST EXEC PGM=IEBGENER                                 
6 //ST.STEPLIB DD                                       
  +/STEPLIB DD DSN=NTSYS.IMSVS.LOADLIB,DISP=SHR         
7 //  DD                                                 
  +/        DD DSN=NASYS.IMSVS.LOADLIB,DISP=SHR         
8 //  DD DSN=AESCLM.P02098L.LOAD,DISP=SHR               
9 ++SYSPRINT DD SYSOUT=*                                 
0 ++SYSUT1 DD DUMMY                                     
1 ++SYSUT2 DD DUMMY                                     
2 ++SYSIN  DD DUMMY                                     


jesmsg
Code:
3 IEFC001I PROCEDURE MIEP WAS EXPANDED USING INSTREAM PROCEDURE DEFINITI
I $$NL58   LAST ACCESS AT 12:43:48 ON THURSDAY, FEBRUARY 15, 2007       
ALLOC. FOR $$NL58PR ST ST1                                             
SMS ALLOCATED TO DDNAME STEPLIB                                         
SMS ALLOCATED TO DDNAME                                                 
SMS ALLOCATED TO DDNAME                                                 
JES2 ALLOCATED TO SYSPRINT                                             
DMY  ALLOCATED TO SYSUT1                                               
DMY  ALLOCATED TO SYSUT2                                               
DMY  ALLOCATED TO SYSIN                                                 
$$NL58PR ST ST1 - STEP WAS EXECUTED - COND CODE 0012                   
NTSYS.IMSVS.LOADLIB                          RETAINED,  DDNAME=STEPLIB 
NASYS.IMSVS.LOADLIB                          RETAINED,  DDNAME=         
AESCLM.P02098L.LOAD                          RETAINED,  DDNAME=         
  $$NL58.$$NL58PR.JOB13753.D0000101.?          SYSOUT                   
STEP/ST      /START 2007046.1245                                       
STEP/ST      /STOP  2007046.1245 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
 JOB/$$NL58PR/START 2007046.1245                                       
 JOB/$$NL58PR/STOP  2007046.1245 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Feb 15, 2007 6:12 pm
Reply with quote

Thanks George, once pointed out, I do (vaguely) recall that...

Bill
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 6:17 pm
Reply with quote

Ok Bill, below the proof: first 2 files and then one added:
Code:
//MIEP PROC                                           
//ST EXEC PGM=IDCAMS                                   
//SYSPRINT DD SYSOUT=*                                 
//SYSOUT   DD SYSOUT=*                                 
//SYSUT1 DD DSN=$$NL58.FILE-1,DISP=SHR                 
//       DD DSN=$$NL58.FILE-2,DISP=SHR                 
//SYSUT2 DD SYSOUT=*                                   
//SYSIN  DD DSN=$$NL58.PROCINP.IDCAMS,DISP=SHR         
// PEND                                               
//ST1 EXEC MIEP                                       


Result:

Code:
********************************* TOP OF DATA **********************************
 FILE-1                                                                         
 FILE-2                                                                         
******************************** BOTTOM OF DATA ********************************
                                                                               


File-3 added:
Code:
//MIEP PROC                                                           
//ST EXEC PGM=IDCAMS                                                 
//SYSPRINT DD SYSOUT=*                                               
//SYSOUT   DD SYSOUT=*                                               
//SYSUT1 DD DSN=$$NL58.FILE-1,DISP=SHR                               
//       DD DSN=$$NL58.FILE-2,DISP=SHR                               
//SYSUT2 DD SYSOUT=*                                                 
//SYSIN  DD DSN=$$NL58.PROCINP.IDCAMS,DISP=SHR                       
// PEND                                                               
//ST1 EXEC MIEP                                                       
//ST.SYSUT1 DD                                                       
//       DD                                                           
//       DD DSN=$$NL58.FILE-3,DISP=SHR                               


Result:


Code:
********************************* TOP OF DATA **********************************
 FILE-1                                                                         
 FILE-2                                                                         
 FILE-3                                                                         
******************************** BOTTOM OF DATA ********************************
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 6:24 pm
Reply with quote

In this one file-2 is overwritten by file-3:

Code:
//MIEP PROC                                                           
//ST EXEC PGM=IDCAMS                                                 
//SYSPRINT DD SYSOUT=*                                               
//SYSOUT   DD SYSOUT=*                                               
//SYSUT1 DD DSN=$$NL58.FILE-1,DISP=SHR                               
//       DD DSN=$$NL58.FILE-2,DISP=SHR                               
//SYSUT2 DD SYSOUT=*                                                 
//SYSIN  DD DSN=$$NL58.PROCINP.IDCAMS,DISP=SHR                       
// PEND                                                               
//ST1 EXEC MIEP                                                       
//ST.SYSUT1 DD                                                       
//       DD DSN=$$NL58.FILE-3,DISP=SHR                               


Result:

Code:
********************************* TOP OF DATA **********************************
 FILE-1                                                                         
 FILE-3                                                                         
******************************** BOTTOM OF DATA ********************************


An this concludes the discussion icon_wink.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 6:51 pm
Reply with quote

raak wrote:
Hi

my Proc goes like this.

DDname DD dsn=xxxx.yyyyy,disp=shr
DD dsn=aaaa.bbbbb,disp=shr
DD dsn=cccc.yyyyy,disp=shr


I want to add a new dataset, say jjjj.rrrr to the DDname. I want to give an override in the JCL coz i am not supposed to change the proc.

In the JCL can i give my New dataset only and get all the four datasets concatenated?
is there any method for that?


Your overwrite will look like this:
Code:

//STEPX.DDname DD
//              DD
//              DD
//              DD DSN=jjjj.rrrr,DISP=SHR
Back to top
View user's profile Send private message
govindc

New User


Joined: 18 Jan 2020
Posts: 2
Location: US

PostPosted: Thu Oct 24, 2024 7:31 pm
Reply with quote

Bitneuker wrote:
You don't have to code all DD-statements fully. Just the one you want to add or modify. Below an example of addition of a DD-statement.

The proc:

Code:
//MIEP PROC                                                   
//ST EXEC PGM=IEBGENER                                       
//STEPLIB DD DSN=NTSYS.IMSVS.LOADLIB,DISP=SHR                 
//        DD DSN=NASYS.IMSVS.LOADLIB,DISP=SHR                 
//SYSPRINT DD SYSOUT=*                                       
//SYSUT1 DD DUMMY                                             
//SYSUT2 DD DUMMY                                             
//SYSIN  DD DUMMY                                             
// PEND                                                       
//ST1 EXEC MIEP                                               
//ST.STEPLIB DD     <-- existing in proc                                         
//  DD                     <-- existing in proc                                   
//  DD DSN=AESCLM.P02098L.LOAD,DISP=SHR    <-- new library                 


extende:
Code:
2 //MIEP PROC                                           
  //ST EXEC PGM=IEBGENER                                 
  //STEPLIB DD DSN=NTSYS.IMSVS.LOADLIB,DISP=SHR         
  //        DD DSN=NASYS.IMSVS.LOADLIB,DISP=SHR         
  //SYSPRINT DD SYSOUT=*                                 
  //SYSUT1 DD DUMMY                                     
  //SYSUT2 DD DUMMY                                     
  //SYSIN  DD DUMMY                                     
  // PEND                                               
3 //ST1 EXEC MIEP                                       
4 ++MIEP PROC                                           
5 ++ST EXEC PGM=IEBGENER                                 
6 //ST.STEPLIB DD                                       
  +/STEPLIB DD DSN=NTSYS.IMSVS.LOADLIB,DISP=SHR         
7 //  DD                                                 
  +/        DD DSN=NASYS.IMSVS.LOADLIB,DISP=SHR         
8 //  DD DSN=AESCLM.P02098L.LOAD,DISP=SHR               
9 ++SYSPRINT DD SYSOUT=*                                 
0 ++SYSUT1 DD DUMMY                                     
1 ++SYSUT2 DD DUMMY                                     
2 ++SYSIN  DD DUMMY                                     


jesmsg
Code:
3 IEFC001I PROCEDURE MIEP WAS EXPANDED USING INSTREAM PROCEDURE DEFINITI
I $$NL58   LAST ACCESS AT 12:43:48 ON THURSDAY, FEBRUARY 15, 2007       
ALLOC. FOR $$NL58PR ST ST1                                             
SMS ALLOCATED TO DDNAME STEPLIB                                         
SMS ALLOCATED TO DDNAME                                                 
SMS ALLOCATED TO DDNAME                                                 
JES2 ALLOCATED TO SYSPRINT                                             
DMY  ALLOCATED TO SYSUT1                                               
DMY  ALLOCATED TO SYSUT2                                               
DMY  ALLOCATED TO SYSIN                                                 
$$NL58PR ST ST1 - STEP WAS EXECUTED - COND CODE 0012                   
NTSYS.IMSVS.LOADLIB                          RETAINED,  DDNAME=STEPLIB 
NASYS.IMSVS.LOADLIB                          RETAINED,  DDNAME=         
AESCLM.P02098L.LOAD                          RETAINED,  DDNAME=         
  $$NL58.$$NL58PR.JOB13753.D0000101.?          SYSOUT                   
STEP/ST      /START 2007046.1245                                       
STEP/ST      /STOP  2007046.1245 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
 JOB/$$NL58PR/START 2007046.1245                                       
 JOB/$$NL58PR/STOP  2007046.1245 CPU    0MIN 00.00SEC SRB    0MIN 00.00S


17 years later and this still came in handy! Thanks
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 589
Location: London

PostPosted: Thu Oct 24, 2024 10:55 pm
Reply with quote

it gets a bit more interesting when you have execution JCL that invokes multiple procs in separate steps, and you want to override a DD in one of the procs!
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
Search our Forums:

Back to Top