Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Concatinating Control Cards

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 86
Location: India

PostPosted: Thu Dec 06, 2007 3:53 pm    Post subject: Concatinating Control Cards
Reply with quote

Hi
I have written the following JCL:

Code:

//STEP1 EXEC PGM=SYNCTOOL                                   
//DFSMSG DD SYSOUT=*                                       
//TOOLMSG DD SYSOUT=*                                     
//SYMBOL  DD DSN=&&SYMBOL,DISP=(NEW,PASS),SPACE=(CYL,(1,1))
//INDD DD *                                               
AAAAAAAAAAAAAAAAAAAAAAAAAAA                               
BBBBBBBBBBBBBBBBBBBBBBBBBBB                               
CCCCCCCCCCCCCCCCCCCCCCCCCCC                               
DDDDDDDDDDDDDDDDDDDDDDDDDDD                               
EEEEEEEEEEEEEEEEEEEEEEEEEEE                               
/*                                                         
//OUTDD  DD SYSOUT=*                                       
//TOOLIN DD *                                             
  SORT FROM(INDD) TO(SYMBOL) USING(CNT1)                   
  SORT FROM(TEMP1) TO(OUTDD) USING(CNT2)                   
/*                                                         
//CNT1CNTL DD *                                           
  OPTION COPY                                             
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                   
   TRAILER1=(C' OUTFIL IFTHEN=(WHEN=(81,5,PD,EQ,',                 
   COUNT=(M11,LENGTH=05),C'),BUILD=(C'''',1,28,29:C'')'',80:X)),') 
/*                                                                 
//CNT2CNTL DD *                                                   
   SORT FIELDS=(81,5,PD,D)                                         
   INREC OVERLAY(81:SEQNUM,5,PD)                                   
/*                                                                 
// DD DSN=&&SYMBOL1,DISP=(OLD,PASS)                               
// DD *                                                           
   IFTHEN=(WHEN=NONE,BUILD=(C'''',1,28,C''',',80:X))               
/*                                                                 


This JCL is throwing the error as:

Code:
STEP1 CNT2CNTL+001 - DATA SET NOT FOUND
STEP1 - STEP WAS NOT EXECUTED.         


I want the o/p as:

Code:
'AAAAAAAAAAAAAAAAAAAAAAAAAA',                             
'BBBBBBBBBBBBBBBBBBBBBBBBBB',                             
'CCCCCCCCCCCCCCCCCCCCCCCCCC',                             
'DDDDDDDDDDDDDDDDDDDDDDDDDD',                             
'EEEEEEEEEEEEEEEEEEEEEEEEEE)


I would like to know why this is happening.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Dec 06, 2007 4:36 pm    Post subject: Reply to: Concatinating Control Cards
Reply with quote

Here, in the JCL, you call the temp dataset &&SYMBOL:

//SYMBOL DD DSN=&&SYMBOL,DISP=(NEW,PASS),SPACE=(CYL,(1,1))

but here you refer to it as &&SYMBOL1:

// DD DSN=&&SYMBOL1,DISP=(OLD,PASS)

looks like a typo.
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 86
Location: India

PostPosted: Thu Dec 06, 2007 4:42 pm    Post subject:
Reply with quote

Hi superk,
That was a typing error. Sorry for that.
It is infact &&symbol
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 4:46 pm    Post subject: Reply to: Concatinating Control Cards
Reply with quote

Learncoholic,

Code:
SORT FROM(TEMP1) TO(OUTDD) USING(CNT2)


What is TEMP1 here? I don't find any DD named TEMP1 in your code?
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 86
Location: India

PostPosted: Thu Dec 06, 2007 4:49 pm    Post subject:
Reply with quote

Sorry

Another typing error icon_redface.gif

It is INDD in fact
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 5:03 pm    Post subject: Reply to: Concatinating Control Cards
Reply with quote

Learncoholic,

This requirement is very similar to the one that you had asked few days before. Check this link and make necessary changes and it should work. Else, post your queries here.

http://ibmmainframes.com/viewtopic.php?t=26252
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 5:10 pm    Post subject: Reply to: Concatinating Control Cards
Reply with quote

Learncoholic,

I have modified the code as per your requirement. Juct check if this is working fine.

Code:
//S EXEC PGM=SORT                                               
//SORTIN  DD *                                                   
AAAAAAAAAAAAAAAAAAAAAAAAAAA                                     
BBBBBBBBBBBBBBBBBBBBBBBBBBB                                     
CCCCCCCCCCCCCCCCCCCCCCCCCCC                                     
DDDDDDDDDDDDDDDDDDDDDDDDDDD                                     
EEEEEEEEEEEEEEEEEEEEEEEEEEE                                     
/*                                                               
//SORTOUT DD DSN=&&SYMNAME,DISP=(,PASS),SPACE=(TRK,(1,1))       
//SYSOUT DD SYSOUT=*                                             
//SYSIN DD *                                                     
 OPTION COPY                                                     
 OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                           
 TRAILER1=(C'LASTREC,+',COUNT=(M11,LENGTH=8))                   
/*                                                               
// EXEC PGM=SORT                                                 
//SORTIN  DD *                                                   
AAAAAAAAAAAAAAAAAAAAAAAAAAA                                     
BBBBBBBBBBBBBBBBBBBBBBBBBBB                                     
CCCCCCCCCCCCCCCCCCCCCCCCCCC                                     
DDDDDDDDDDDDDDDDDDDDDDDDDDD                                     
EEEEEEEEEEEEEEEEEEEEEEEEEEE                                     
/*                                                                     
//SYMNAMES DD DSN=*.S.SORTOUT,DISP=(OLD,DELETE),VOL=REF=*.S.SORTOUT     
//SORTOUT DD SYSOUT=*                                                   
//SYSOUT DD SYSOUT=*                                                   
//SYSIN DD *                                                           
 OPTION COPY                                                           
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),                     
 IFTHEN=(WHEN=(81,8,ZD,LT,LASTREC),BUILD=(C'''',1,27,C''',',80:X)),     
 IFTHEN=(WHEN=(81,8,ZD,EQ,LASTREC),BUILD=(C'''',1,27,C')',80:X))       
 OUTFIL BUILD=(1,80)                                                   
/*                                                                     


output:

Code:
'AAAAAAAAAAAAAAAAAAAAAAAAAAA',     
'BBBBBBBBBBBBBBBBBBBBBBBBBBB',     
'CCCCCCCCCCCCCCCCCCCCCCCCCCC',     
'DDDDDDDDDDDDDDDDDDDDDDDDDDD',     
'EEEEEEEEEEEEEEEEEEEEEEEEEEE)       
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 86
Location: India

PostPosted: Thu Dec 06, 2007 5:22 pm    Post subject:
Reply with quote

Hi Aaru
Thank you so much. Your JCL is working fine.
I would also want to know where exactly was my error and why it didn't work out.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 5:29 pm    Post subject: Reply to: Concatinating Control Cards
Reply with quote

You are welcome icon_biggrin.gif .

The problem is with the second control card. I guess the syntax is wrong. what were you trying to do with this code?

Code:
// DD DSN=&&SYMBOL,DISP=(OLD,PASS)                               
// DD *                                                           
   IFTHEN=(WHEN=NONE,BUILD=(C'''',1,28,C''',',80:X))               
/*                                                             
Back to top
View user's profile Send private message
Learncoholic

New User


Joined: 20 Sep 2007
Posts: 86
Location: India

PostPosted: Thu Dec 06, 2007 6:05 pm    Post subject:
Reply with quote

Hi Aaru,

Well I wanted to concatanate The Control cards to give a complete control as:

Code:
SORT FIELDS=(81,5,PD,D)                                         
INREC OVERLAY(81:SEQNUM,5,PD)
OUTFIL IFTHEN=(WHEN=(81,5,PD,EQ,00005),BUILD=(1,28,29:C')',80:X)),
IFTHEN=(WHEN=NONE,BUILD=(C'''',1,28,C''',',80:X))               


The first two lines is provided through CNT2CNTL. Then the SYMBOL dataset is concatinated to give the 3rd line and finally the last instream DD statement concatinates the last of control statements.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Cards mainframe developer requirement... capricorn Mainframe Jobs 0 Sun Sep 11, 2016 9:57 am
No new posts Control-M manuals JPVRoff All Other Mainframe Topics 0 Fri May 20, 2016 11:15 am
No new posts Which Control block has the DSNTYPE i... sudarshan.srivathsav PL/I & Assembler 4 Thu Jan 28, 2016 11:29 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us