Build Copybook filter with VBScript

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

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

Build Copybook filter with VBScript

Post by mauros64 »

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: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Build Copybook filter with VBScript

Post by DataMystic Support »

This update is now available in v8.4.2.
Post Reply