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

Use TEmplates for Punch card and sysrec data sets


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Oct 07, 2010 8:53 am
Reply with quote

Hi all,

I want to use Templates for Syspunch dataset and sysrec dataset using DSNTI aul. I am able to unload the data if i specify normal data set like

Code:
//CRTESQL  EXEC PGM=IKJEFT01,DYNAMNBR=20                   
//STEPLIB  DD  DISP=SHR,DSN=D2T3.DSNEXIT                   
//         DD  DISP=SHR,DSN=D2T3.DSNLOAD                   
//SYSTSPRT DD  SYSOUT=*                                     
//SYSTSIN  DD  *                                           
 DSN SYSTEM(D2T3)                                           
 RUN  PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL') -       
      LIB('D2T3.RUNLIB.LOAD')                               
//SYSPRINT DD SYSOUT=*                                     
//SYSUDUMP DD SYSOUT=*                                     
//SYSREC00 DD DSN=TNASC.UNLOAD.CLM07MOD.CLM.D100822.DATA,   
//            DISP=(NEW,CATLG,DELETE),                     
//            UNIT=(SYSDA,9),SPACE=(CYL,(100,50),RLSE)     
//SYSPUNCH DD DSN=TNASC.UNLOAD.CLM07MOD.CLM.CNTL,           
//            DISP=(NEW,CATLG,DELETE),                     
//            UNIT=SYSDA,SPACE=(CYL,(5,1),RLSE),           
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=0000)         
//**********************************************************
//*  UNLOAD TABLE A51DD2T3.Y2006.CLM                       
//**********************************************************
//SYSIN    DD *                                             
  SELECT                                                   
  DB2_PART_KEY                                             
  ,TRACER_ID                                               
  ,SYS_CREATE_DT                                           
  ,  CASE  STRIP(TRANS_TYPE, B)                             
     WHEN 'TRLOG'  THEN 1                                   
     WHEN 'SF' THEN 3                                       
     WHEN '837I' THEN  18                                   
     WHEN '837P' THEN  19                                   
     WHEN '837D' THEN 20                                   
     ELSE 0                                                 
     END AS  FORMAT_VER_ID                                 
  ,PLAN_CD     
FROM PNASCO.ABC             



But instead of giving dataset names i want to use TEMPlate like
For syspunch
Code:
TEMPLATE  MYSYSR   DSN 'DB2DBA.&TS..&UQ..P&PA..SREC'   
  UNIT SYSDA DISP (NEW,CATLG,CATLG) SPACE (5,5) TRK   
Fo r sysrec
Code:
TEMPLATE  MYSYSRT  DSN 'DB2DBA.&TS..&UQ..SREC'
    UNIT TAPEC                                       
    MODELDCB SYS3.DSCB                               
    BUFNO 10                                         
    MGMTCLAS MCMT0001                               
    RETPD 30                                         
    DISP(NEW,CATLG,CATLG
)


Please advise.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Oct 07, 2010 9:24 am
Reply with quote

Hello,

Do you expect some advantage by providing such a TEMPLATE input?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Oct 07, 2010 11:32 am
Reply with quote

Yes, I have to unload by partitions and 100 of tables so rather than declaring name it is better to use template.
Have you ever used it with Dsntiaul.I know we can easily use it with dsnuproc but with dsnuproc Strip and case is not working
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Oct 07, 2010 3:42 pm
Reply with quote

I don't think template is possible in dsntiaul.

one way is to create tables from your select and then unload those tables.

Why do you need those files ?
If it is to load them somewhere else you could probably use crossloading.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top