Page 1 of 1

Determining EOR/EOF within a Transformer

Posted: Thu Sep 26, 2002 2:06 pm
by csimms
Sorry for waisting other member's time with this posting. The "Trailer Record" question posted previously gives the answer to my question...

Hello everyone,

I need to insert a special "E!" end-of-record indicator as part of
processing data into a sequential file. Assuming that I am able to
perform this logic in the same job, is there a mechanism that would
allow me to poll for a special EOR or EOF status/event? If there is, I would like to use it to define a constraint in a transformer that would control when the "E!" indicator is actually written to the file.

Thanks,



Chris Simms
Systems Engineer
Extended Technologies Corporation
9708 Skillman Road
Dallas, TX 75243
csimms@xtekcorp.com
www.xtekcorp.com
214-540-4117 (Desk)
214-540-4000 (Front Desk)
214-540-4004 (FAX)

Edited by - csimms on 09/26/2002 16:47:57

Edited by - csimms on 09/26/2002 16:48:54

Edited by - csimms on 09/26/2002 16:52:07

Posted: Sun Sep 29, 2002 6:39 pm
by ray.wurlod
I would use the Transformer stage stage properties, and select after-stage subroutine. Choose ExecSH (for UNIX) or ExecDOS (for WinNT) as the subroutine name, and the command to be executed is:
echo E! >> #pathname#

In this example I have assumed that the file's pathname is in a single job parameter. You can, of course, hard code it (not recommended, against the day when you decide to use multiple instances). If you have the directory in a separate parameter:
echo E! >> #directory#/#filename#

You could even parameterise the end-of-data string if you wish!

Posted: Tue Oct 01, 2002 10:35 am
by csimms
Ray,

Thanks! The after-stage routine works great. Sometimes, I guess you have to think out of the box.

Chris

Chris Simms

Senior Systems Engineer
Extended Technologies Corporation
9708 Skillman Road
Dallas, TX 75243
csimms@xtekcorp.com
www.xtekcorp.com
214-540-4108 (Desk)
214-540-4000 (Front Desk)
214-540-4004 (Fax)