Build Copybook filter with VBScript
Posted: 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.
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.