All Forums Tools
Om 9 posts Joined 08/11
11 Aug 2011
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.

RayFlog 10 posts Joined 08/11
12 Aug 2011

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.

Thank you,
Mr. Flog

Om 9 posts Joined 08/11
16 Aug 2011

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

feinholz 1234 posts Joined 05/08
17 Aug 2011

Thanks for bringing this up. I will forward to the dev team for analysis.

--SteveF

feinholz 1234 posts Joined 05/08
17 Aug 2011

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

RayFlog 10 posts Joined 08/11
17 Aug 2011

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.

Thank you,
Mr. Flog

feinholz 1234 posts Joined 05/08
17 Aug 2011

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

RayFlog 10 posts Joined 08/11
18 Aug 2011

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.

Thank you,
Mr. Flog

feinholz 1234 posts Joined 05/08
18 Aug 2011

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

RayFlog 10 posts Joined 08/11
18 Aug 2011

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.

Thank you,
Mr. Flog

feinholz 1234 posts Joined 05/08
24 Aug 2011

Do not want to beat a dead horse here, but whether the script has [1] or not, the job should run.
And it runs fine on our MVS system inhouse.
Thus, it would be nice to figure out what is wrong with that particular script.

--SteveF

Om 9 posts Joined 08/11
08 Sep 2011

Ray & Feinholz,

                         I appreciate valuable feedback.  I agree with Ray it is something to do with hex values. I changed the hex values as Ray stated earlier and it resolved the problem.

To summarize : The script given earlier is working script depending on the below lines in the script.

Copy from mainframe with hex values (WORKS).  Looks weird in mainframe because [ (left bracket) is replaced with Y with an accent(in bold below) and right bracket ] is replaced with " quotes.  Therefore look is different but internally it works.  I ftp'd this file to my PC and it replaced the below weird values to [ left bracket and right bracket respectively.  

TO OPERATOR (LOAD_OPERATOR Ý2¨)
        444444ED4DDCDCEDD44DDCC6DDCDCEDD4AFB544444444444444444444444444444444444
        000000360675913690D3614D675913690D2DD00000000000000000000000000000000000

SELECT * FROM OPERATOR(READ_OPERATOR Ý2¨);
        444444ECDCCE454CDDD4DDCDCEDD4DCCC6DDCDCEDD4AFB55444444444444444444444444
        0000002535330C06964067591369D9514D675913690D2DDE000000000000000000000000

After ftp the above statements looks like

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

Since TD is on unix/linux and sees in ascii doesn't complain.  The reverse is not true. Looks good on mainframe (DOES NOT WORK), no weird symbols as before but internal hex doesn't seem right and doesn't translate well.

000086       TO OPERATOR (LOAD_OPERATOR [2])
        444444ED4DDCDCEDD44DDCC6DDCDCEDD4BFB544444444444444444444444444444444444
        000000360675913690D3614D675913690A2BD00000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000087       SELECT * FROM OPERATOR(READ_OPERATOR [2]);
        444444ECDCCE454CDDD4DDCDCEDD4DCCC6DDCDCEDD4BFB55444444444444444444444444
        0000002535330C06964067591369D9514D675913690A2BDE000000000000000000000000

FTP the files that looks good on mainframe with [] brackets and you get weird characters on the ascii side as below

TO OPERATOR (LOAD_OPERATOR 2Ù)                                          
      SELECT * FROM OPERATOR(READ_OPERATOR 2Ù);

Therefore TD is complaining with syntax error.

Still a mystery, hope you can shed some light.

Thanks,

TD9

 

 

feinholz 1234 posts Joined 05/08
08 Sep 2011

Our mainframe guy suggests this:

"The user should reset there  emulater  code-page  to  1047 not  037."

 

He feels this is an issue with the terminal emulator being used when creating the TPT scripts.

 

--SteveF

Om 9 posts Joined 08/11
09 Sep 2011

Thanks Feinholz.  Changing the emulater  to 1047 worked. No syntax issues.

I appreciate the help.

 

RayFlog 10 posts Joined 08/11
09 Sep 2011

TD9 and Feinholz.  Thank you for your updates.

 

TD9,

We should keep in touch.  There aren't many mainframe TPT implementations, so it's hard to get help from community.  Please feel free to mail me at rmomin@qssinc.com

 

Thanks.

Thank you,
Mr. Flog

Om 9 posts Joined 08/11
13 Sep 2011

sure Flog. Thanks for sharing.

Regards,

TD9

vijaydf 16 posts Joined 06/12
21 Jun 2013

Do we need to give varchar MultipleReaders=’Y’ in the Data Connector producer operator to have the mulitple read instance in TPT? What will  happen if we dont set varchar MultipleReaders=’Y’ and give multiple instance of reader operator.
 
I am getting the below error message when i use the variable MultipleReaders in my tpt script- We use Named pipe as input file (VARCHAR AccessModuleName = 'np_axsmod.so')
File_Reader3: TPT19003 !ERROR! feature requires a REGULAR file. File 'ICDW_FL_EDW_EDW_DIM_ECI_DTL_pipe3' is not a REGULAR file.
File_Reader3: TPT19003 TPT Exit code set to 12.
File_Reader: TPT19003 ECI operator ID: File_Reader-29689422
File_Reader4: TPT19003 ECI operator ID: File_Reader4-38076792
File_Reader4: TPT19003 !ERROR! feature requires a REGULAR file. File 'ICDW_FL_EDW_EDW_DIM_ECI_DTL_pipe4' is not a REGULAR file.
File_Reader4: TPT19003 TPT Exit code set to 12.
File_Reader2: TPT19003 ECI operator ID: File_Reader2-15926130
File_Reader2: TPT19003 !ERROR! feature requires a REGULAR file. File 'ICDW_FL_EDW_EDW_DIM_ECI_DTL_pipe2' is not a REGULAR file.
File_Reader2: TPT19003 TPT Exit code set to 12.
File_Loader: connecting sessions
 

Vijay Mani

Fred 1096 posts Joined 08/04
21 Jun 2013

Multiple instances are normally used to read from different files in parallel, e.g. with FileList='Y' or DirectoryPath.
 
MultipleReaders='Y' allows multiple instances to do "interleaved" reads from the same file. This feature is not supported for Named Pipes.

vijaydf 16 posts Joined 06/12
21 Jun 2013

Thanks fred,
We created named pipes so that we can read .gz & compressed files.. just wanted to check if  there is any access module that can use with dataconnector to read unix .gz files

Vijay Mani

Fred 1096 posts Joined 08/04
22 Jun 2013

I am not aware of one that is publicly available.

dnoeth 4628 posts Joined 11/04
23 Jun 2013

Hi Vijay,
TPT 14 DataConnector supports .zip and .gz files directly, but i don't know if it supports MultipleReaders, probably not.
 
Dieter

Dieter

vijaydf 16 posts Joined 06/12
29 Oct 2013

Hi,
when i am trying to read 16 names pipe in my tpt script i am getting the below error message; any inputs on this ?
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
TPT_INFRA: TPT02610: Error: Could not allocate a data message of size 65028
TPT_INFRA: TPT02284: Error: Cannot create data buffer, Data Stream status = 3
File_Loader: disconnecting sessions
 

Vijay Mani

feinholz 1234 posts Joined 05/08
30 Oct 2013

Looks like you have run out of system resources (most likely, shared memory).
You can increase the shared memory by:
 
In the JCL STEP, they should have the following specification:
 
//TPT     EXEC PGM=TBUILD,REGION=0M,
//             PARM='-h 100M'
 
REGION of 0M to for allowing the job to run with the maximum region size and the 100M is going to be sub-allocated from the region size.

--SteveF

vijaydf 16 posts Joined 06/12
19 Oct 2014

The Tpt extract completed with warnings. Because of the warnings the job status is set to failure. When i checked the tbuild private log, i see the error message "TPT1502 Error: No catalog or message found"
 
As per the Teradata manual it seems to be TPT infrastructure error. can someone please let me know how to fix this error.

Vijay Mani

feinholz 1234 posts Joined 05/08
27 Oct 2014

It appears as though your installed TPT components are not in sync with each other.
The error is telling you that the message catalog is not the correct one for the installed version of TPT (a componet of TPT has placed a message in the log that is not known to the version of the message catalog that is installed).
You may have to check with your system administrator on that.

--SteveF

You must sign in to leave a comment.