TPT multiple instances using mainframe host (Syntax error).

Tools
Om
Enthusiast

TPT multiple instances using mainframe host (Syntax error).

Hi all,
I am doing TPT from mainframe. I have data connector -- producer reading from file and load operator loading the file. The script runs fine without multiple instances. If I add [n] for multiple instances to the script, I get below syntax issue and unable to resolve it. Any help is appreciated.

Below works.

/* JGB. JM */

DEFINE JOB LOAD_TABLE
DESCRIPTION 'LOAD PTY TABLE'
(
DEFINE SCHEMA PTY_SCHEMA
DESCRIPTION 'PTY TABLE SCHEMA'
(
FRST_NM CHAR(50),
LST_NM CHAR(50),
GNR_NM CHAR(5),
PTY_ID CHAR(11),
EFECT_STRT_DT CHAR(10),
EFECT_STRT_TM CHAR(8),
EFECT_END_DT CHAR(10),
EFECT_END_TM CHAR(8),
PTY_TYP_CD CHAR(1),
INTCO_CC_NO INTEGER,
INTCO_BNK_CD INTEGER,
LGL_CLAS_CD CHAR(2),
PUBLY_TRADD_IN CHAR(1),
ESTBL_ST_CD CHAR(3),
ESTBL_DT CHAR(10),
BKRPT_CHPT_CD CHAR(2),
CED_TRS_IN CHAR(1),
DEL_IN CHAR(1),
SOR_CD CHAR(3),
ROW_ADD_TS CHAR(8),
ROW_UPDT_TS CHAR(8)
) ;

DEFINE OPERATOR LOAD_OPERATOR
DESCRIPTION 'LOAD OPERATOR'
TYPE LOAD
SCHEMA PTY_SCHEMA
ATTRIBUTES
( VARCHAR TDPID = @JOBVAR_TDPID,
VARCHAR USERNAME = @JOBVAR_USERNAME,
VARCHAR USERPASSWORD = @JOBVAR_PASSWORD,
VARCHAR PRIVATELOGNAME = 'PTY_LOAD_LOG',
INTEGER MAXSESSIONS = 10,
INTEGER MINSESSIONS = 1,
VARCHAR TARGETTABLE = 'xxxx.MA_TPTLOAD',
VARCHAR ERRORTABLE1 = 'xxxx.ET_TPTLOAD1',
VARCHAR ERRORTABLE2 = 'xxxx.ET_TPTLOAD2',
VARCHAR LOGTABLE = 'xxxx.WT_TPTLOAD'
) ;

DEFINE OPERATOR READ_OPERATOR
DESCRIPTION 'READ FILE'
TYPE DATACONNECTOR PRODUCER
SCHEMA PTY_SCHEMA
ATTRIBUTES
( VARCHAR FILENAME = 'DD:PTYIN',
VARCHAR INDICATORMODE='N',
VARCHAR OPENMODE='READ',
VARCHAR FORMAT='UNFORMATTED'
) ;

STEP LOAD_TABLES
(
APPLY
( 'INSERT INTO xxxx.MA_TPTLOAD
VALUES
(:FRST_NM ,
:LST_NM ,
:GNR_NM ,
:PTY_ID ,
:EFECT_STRT_DT ,
:EFECT_STRT_TM ,
:EFECT_END_DT ,
:EFECT_END_TM ,
:PTY_TYP_CD ,
:INTCO_CC_NO ,
:INTCO_BNK_CD ,
:LGL_CLAS_CD ,
:PUBLY_TRADD_IN ,
:ESTBL_ST_CD ,
:ESTBL_DT ,
:BKRPT_CHPT_CD ,
:CED_TRS_IN ,
:DEL_IN ,
:SOR_CD ,
:ROW_ADD_TS ,
:ROW_UPDT_TS);')
TO OPERATOR (LOAD_OPERATOR )
SELECT * FROM OPERATOR(READ_OPERATOR );
);
);

If I change the last two statements to have an instance I get the following error

TO OPERATOR (LOAD_OPERATOR [1] )
SELECT * FROM OPERATOR(READ_OPERATOR [1] );

Teradata Parallel Transporter Version 13.10.00.04
Job terminated with status 8.
TPT_INFRA: Syntax error at or near line 66 of Job Script File 'dd:SYSIN':
TPT_INFRA: At "1" missing RPAREN_ in Rule: OPERATOR Clause
Compilation failed due to errors. Execution Plan was not generated.
Job script compilation failed.
24 REPLIES
Enthusiast

Re: TPT multiple instances using mainframe host (Syntax error).

I know I am not being much of help here, but just want to connect with a fellow mainframe TPT user.

I've used similar scripts recently, never really tried using instance in the script and it always worked. After seeing your post I tried script and got same errors as you did.

I've couple of other errors that I am running into. 1) My TBUILD step executes successfully, but the control is never returned back to the JCL. The job just waits in a swapped out state. Have you encountered any of this at your installation? 2) I have loaded 11GB files to my teradata table using DataConnector. However, if I try to go load 60GB the job just dies on my with RC=3000. I do not get any error message. I printed the TPT joblog, and it shows progress up to Acquisition phase, but no errors. 3) I have also been trying to use INMOD but running into all sorts of errors that do not make sense. Have you tried INMOD at your shop?

My TPT version is 13.10.00.00 and yours is 13.10.00.04. It is possible you do not get any of my errors since you seem to have more updated version.

Your thoughts and feedback is appreciated.
Om
Enthusiast

Re: TPT multiple instances using mainframe host (Syntax error).

Flog,
Thanks for connecting.

A1) I didn't encounter the problem. The control is returned back to JCL. I am wondering is it something to do with parameters passed? The parameter that is passed to Tbuild is -S option.

A2) Didn't load large file yet such as 60GB. The file that I loaded without any instance is 20GB and didn't encounter problems.

A3) Haven't tried INMOD yet. Will keep you posted.

You are encountering the same problems with specfying instances on operators makes me wonder if this is an TD issue from mainframe?

Once I get access to unix platform. I will try to run the same script from unix and check if I encounter the same pblm.

If you have resolved the problem, I would appreciate if you can share.

Thanks,
TD9
Teradata Employee

Re: TPT multiple instances using mainframe host (Syntax error).

Thanks for bringing this up. I will forward to the dev team for analysis.
-- SteveF
Teradata Employee

Re: TPT multiple instances using mainframe host (Syntax error).

Ok, we just tried this in house with efix #4 (13.10.00.04) and it works for us without any syntax problems.
Therefore, please post the entire script.
There must be something else wrong with the syntax.
Thanks!
-- SteveF
Enthusiast

Re: TPT multiple instances using mainframe host (Syntax error).

TD9,

Please try adding
VARCHAR MultipleReaders = 'Y'
to Dataconnector operator

Then change apply statement to have instances

TO OPERATOR (LOAD_OPERATOR[2])
SELECT * FROM OPERATOR (READ_OPERATOR[2]);

A1) This problem was solved once the administrators applied the patches. Now the job returns the control back to Z/OS.

A2) The problem was due to insufficient CPU time. In mainframe world we are used to seeing S322, however Teradata return RC=3000. All I had to do was put the job in a different class with more time or add a TIME parameter.

A3) INMOD is still an issue. Let me know if you try INMOD on your side.

Thanks.
Teradata Employee

Re: TPT multiple instances using mainframe host (Syntax error).

MultipleReaders is used to invoke a special feature in the DC operator.
It will not solve the syntax issue being reported (unless you are using MultipleReader to address a different issue on this thread, it is hard to distinguish).
-- SteveF
Enthusiast

Re: TPT multiple instances using mainframe host (Syntax error).

Thank for the information on MultipleReaders.

Here is possible answer on syntax issue:
I came to know that Teradata uses a different code page, hence the square brackets ([ and ]) are represented by x'ad' and x'bd' respectively. Please edit your script and turn HEX ON and change [ to x'ad' and ] to x'bd' and retry.
Teradata Employee

Re: TPT multiple instances using mainframe host (Syntax error).

I am not sure what Teradata has to do with this. This is just a script parsing issue on the mainframe.
We have tried with 13.00.04 inhouse and do not have a problem.
Thus, we think there is some other syntax error in the script.
This is why I asked TDP9 to supply the full sript.
Once we have that, we will take a look and even run it ourselves on our machine.
-- SteveF
Enthusiast

Re: TPT multiple instances using mainframe host (Syntax error).

Sounds fair.

I believe TDP9's script runs just fine if he/she removes [1] from APPLY, at least it did with me. When I provided the hex values to x'ad' and x'bd' I was able to get past the syntax error, I did run into another issues unrelated to the syntax error mentioned by TDP9.

Feinholz, we really appreciate your constant and quick feedback on this forum.