Build Copybook filter with VBScript

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

mauros64
Posts: 11
Joined: Tue Oct 13, 2009 7:24 pm

Build Copybook filter with VBScript

Postby mauros64 » Tue Oct 27, 2009 11:45 pm

Export to VBScript (but also to JScript) loose any definition of Mainframe Copybook Filters.

I've a filter like this:

[...]
|
|--Comment...
| before Copybook
|
|--Mainframe Copybook [ ****************************************************************** * FIRST COPYBOOK * ]
|
|--Comment...
| after Copybook
|
[...]


andthe VBScript output contains this code:

sub vb_build_filter( TPWindow )

dim f1,f2,f3,f4,f5,f6

TPWindow.startFilters
TPWindow.clearAllFilters
TPWindow.logEnabled = false
TPWindow.logFilename = "textpipe.log"
TPWindow.logAppend = true
TPWindow.logThreshold = 500
TPWindow.inputMode = 1
TPWindow.inputBinaryFiles = 0
TPWindow.inputBinarySampleSize = 100
TPWindow.inputPromptOnEach = false
TPWindow.inputPromptOnReadOnly = false
TPWindow.inputDeleteFiles = false
TPWindow.inputInsideCompressed = true
f1 = TPWindow.addCommentFilter( "before Copybook " )
f1 = TPWindow.addCommentFilter( "after Copybook " )
TPWindow.outputMode = 1
TPWindow.outputRetainDate = false
TPWindow.outputTestMode = 1
TPWindow.outputAppend = false
TPWindow.outputOnlyOutputChangedFiles = 1
TPWindow.outputOpenOutputOnCompletion = false
TPWindow.outputExtension = ""
TPWindow.outputFolder = ""
TPWindow.outputRemoveEmpty = false
TPWindow.endFilters


'File List:
TPWindow.clearAllFiles
TPWindow.addFile "C:\Input\HostData1", 0, 1

end sub 'End subroutine

----------------------------------------------
As you can see between the to comment filter the copybook filter is missing.

I'm using the engine to process many files with some variation, so I build the VBScript to see how to use the API.

Can you tell me how to add programmatically a Copybook Filter ?

Thanks.

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Build Copybook filter with VBScript

Postby DataMystic Support » Thu Oct 29, 2009 2:59 pm

This update is now available in v8.4.2.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 6 guests