TBADD Buffer File Usage



IBM's Command List programming language & Restructured Extended Executor

TBADD Buffer File Usage

Postby Ramsee » Fri May 30, 2014 7:52 pm

Hi All,

Warm greetings!!

I have a doubt in using the TBADD TADSN in my program.

Scenario:
1. I have written FLAT File with the contents Example : From 1 to 16 it have a DATASET NAME and 21 to 30 it has an another DATASET NAME.
2. Now i need to pass this DATASET NAMES to the SKELETON JCL Via TBADD TADSN to execute the JCL Successfully.
 "ALLOC F(INFLE) DSN('"SKUNZFLE"')SHR REU"                       
                                                                 
 ADDRESS ISPEXEC "TBCREATE TADSN NAMES (SKD SEQ) NOWRITE REPLACE"
                                                                 
 "EXECIO 1 DISKR INFLE"                                         
                                                                 
 do while (rc=0)                                                 
    seq = seq + 1                                               
    pull SKD                                                     
    SAY 'DATA PULLED : ' SKD                                     
    DSN1 = SUBSTR(SKD,1,16)                                     
    SAY 'DSN1 : ' DSN1                                           
    DSN2 = SUBSTR(SKD,21,30)                                     
    SAY 'DSN2 : ' DSN2                                           
    address ispexec "TBADD TADSN"                               
    "EXECIO 1 DISKR INFLE"                                       
 end                                                             

Issue:
1. If i execute the Program i am getting on the Last DATASET of the FILE (If i have 5 LINES of DATASET NAMES i am able to see only the LAST DATASET NAME in all the Dynamic steps executed).

SKELETON JCL :
)DOT TADSN       
)IF &SEQ = 1 THEN
)DO               
//STEP003  EXEC PGM=EZTPA00,REGION=4000K 
//SYSSORT  DD  SYSOUT=*                   
//INFILE   DD  DSN=&DSN1,DISP=SHR     
//.......
//STEP004  EXEC PGM=ABC           
//DD01     DD DSN=&SKDSN4,DISP=SHR     
//DD01O    DD DSN=&DSN2,               
//            DISP=(,CATLG,DELETE),   
//            SPACE=(CYL,(10,5),RLSE),
//            RECFM=VB,LRECL=2131   
   

Expanded version:
Sequence 1 :
//STEP003  EXEC PGM=EZTPA00,REGION=4000K       
//SYSSORT  DD  SYSOUT=*                         
//INFILE   DD  DSN=INPUT.D108,DISP=SHR   
...
//STEP004  EXEC PGM=ABC                           
//DD01     DD DSN=TEST.FILE,DISP=SHR
//DD01O   DD DSN=OUTPUT.D108,   
Sequence 2 :
//STEP003  EXEC PGM=EZTPA00,REGION=4000K       
//SYSSORT  DD  SYSOUT=*                         
//INFILE   DD  DSN=INPUT.D108,DISP=SHR   
...
//STEP004  EXEC PGM=ABC                           
//DD01     DD DSN=TEST.FILE,DISP=SHR
//DD01O   DD DSN=OUTPUT.D108,
Sequence 3 :
//STEP003  EXEC PGM=EZTPA00,REGION=4000K       
//SYSSORT  DD  SYSOUT=*                         
//INFILE   DD  DSN=INPUT.D108,DISP=SHR   
...
//STEP004  EXEC PGM=ABC                           
//DD01     DD DSN=TEST.FILE,DISP=SHR
//DD01O   DD DSN=OUTPUT.D108,
Sequence 4 :
//STEP003  EXEC PGM=EZTPA00,REGION=4000K       
//SYSSORT  DD  SYSOUT=*                         
//INFILE   DD  DSN=INPUT.D108,DISP=SHR   
...
//STEP004  EXEC PGM=ABC                           
//DD01     DD DSN=TEST.FILE,DISP=SHR
//DD01O   DD DSN=OUTPUT.D108, 
Sequence 5 :
//STEP003  EXEC PGM=EZTPA00,REGION=4000K       
//SYSSORT  DD  SYSOUT=*                         
//INFILE   DD  DSN=INPUT.D108,DISP=SHR   
...
//STEP004  EXEC PGM=ABC                           
//DD01     DD DSN=TEST.FILE,DISP=SHR
//DD01O   DD DSN=OUTPUT.D108,

Kindly let me know what was the wrong in this above code and educate me on this.

Thanks,
Ramsee
Ramsee
 
Posts: 25
Joined: Wed Nov 20, 2013 6:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: TBADD Buffer File Usage

Postby Pedro » Fri May 30, 2014 9:18 pm

The variable names used in the TBCREATE do not match the usage in the DO loop or in the skeleton.

You can debug file tailoring skeletons using the ISPFTTRC command.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: TBADD Buffer File Usage

Postby Ramsee » Fri May 30, 2014 9:52 pm

Thanks a lot Pedro for the help..
Now i am able to get the desired output.
Ramsee
 
Posts: 25
Joined: Wed Nov 20, 2013 6:08 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post