Using ModifyRowset to filter rows from flat file to new file

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

standman

Posts: 4
Joined: Wed Aug 13, 2014 12:34 pm

Post by standman » Wed Jun 17, 2015 12:27 pm
I need to read a flat file and output the rowset to a new file where the substring(Rowsetvariable,25,1) eq 'M'. Below is the xml for the project. I keep getting errors when debugging and need some direction.
Code: Select all
<project name="TEST_FILE-PARSE" mainModule="Main" version="2.0">

	<module name="Main">

		<createWorkspace version="1.0" />


		<readFlatFile inputFile="resource:smb://mbs2/srobbins/test/1025930_IRXMBS_MBSMBR_20150616_.txt" outputRowSetVariable="rowsetout" version="1.0" />


		<modifyRowSet inputRowSetVariable="${rowsetout}" outputRowSetVariable="newoutput" existingColumns="true" includeRow="${Substring(rowsetout[1], 25, 1) eq &apos;M&apos;}" version="1.0" />


		<writeFixedWidth inputRowSetVariable="${rowsetout}" outputFile="resource:smb://MBS2/srobbins/test/test_SXC.txt" whenFileExists="overwrite" includeHeadings="false" recordDelimiter="CRLF" version="1.0" />


		<deleteWorkspace version="1.0" />

	</module>

</project>
Here is the error log.

Jun 17, 2015 1:26:06 PM INFO Start Date and Time: 6/17/15 1:26:06 PM
Jun 17, 2015 1:26:06 PM INFO Job Number: 1000000457255
Jun 17, 2015 1:26:06 PM INFO Project Name: /TESTING/TEST_FILE-PARSE
Jun 17, 2015 1:26:06 PM INFO Submitted By: administrator
Jun 17, 2015 1:26:06 PM INFO GoAnywhere Director 4.6.1 running on Windows Server 2012 6.2 (amd64)
Jun 17, 2015 1:26:06 PM INFO ******************** Debug Mode ********************
Jun 17, 2015 1:26:06 PM INFO Executing project 'TEST_FILE-PARSE'
Jun 17, 2015 1:26:06 PM INFO Project location: C:\Program Files\Linoma Software\GoAnywhere\userdata\projects\TESTING\TEST_FILE-PARSE.xml
Jun 17, 2015 1:26:06 PM INFO Executing module 'Main'
Jun 17, 2015 1:26:09 PM INFO Executing task 'createWorkspace 1.0'
Jun 17, 2015 1:26:09 PM INFO Workspace directory for this job is set to 'C:\Program Files\Linoma Software\GoAnywhere\userdata\workspace\1000000457255'.
Jun 17, 2015 1:26:09 PM INFO Finished task 'createWorkspace 1.0'
Jun 17, 2015 1:26:12 PM INFO Executing task 'readFlatFile 1.0'
Jun 17, 2015 1:26:12 PM INFO Data parsed successfully and the rowset variable 'rowsetout' was created
Jun 17, 2015 1:26:12 PM INFO Finished task 'readFlatFile 1.0'
Jun 17, 2015 1:26:13 PM INFO Executing task 'modifyRowSet 1.0'
Jun 17, 2015 1:26:13 PM ERROR java.lang.NullPointerException
Jun 17, 2015 1:26:13 PM INFO Finished project 'TEST_FILE-PARSE'
Jun 17, 2015 1:26:13 PM ERROR [8099 - modifyRowSet] An unexpected error occurred.
java.lang.NullPointerException
com.linoma.dpa.runtime.JobFailedException: [8099 - modifyRowSet] An unexpected error occurred.
java.lang.NullPointerException
at com.linoma.dpa.runtime.Job.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.linoma.dpa.tasks.modifyrowset.ModifyRowSetTask.internalValidate(Unknown Source)
at com.linoma.dpa.tasks.modifyrowset.ModifyRowSetTask.execute(Unknown Source)
at com.linoma.dpa.ModuleV2.execute(Unknown Source)
at com.linoma.dpa.Project.execute(Unknown Source)
at com.linoma.dpa.runtime.Job.executeProject(Unknown Source)
... 2 more
Jun 17, 2015 1:26:13 PM INFO End Date and Time: 6/17/15 1:26:13 PM

Support_Chris

Support Specialist
Posts: 7
Joined: Thu Oct 24, 2013 10:23 am

Post by Support_Chris » Fri Jun 19, 2015 9:19 am
Hi Standman,
Noting the version that your project is running, 4.6.1, we added a fix in 4.7.0 for the modify rowset task when no column subelements are added to the task.

Here is a link to the release notes for Director: http://www.goanywhere.com/support/relea ... e-director

and specifically here is the fix that applies to your forum question:

- Fixed an issue with the Modify RowSet task that could occur if using existing column and no Column subelements are added to the task.

Thanks,

Chris
Chris Spargen
Technical Support Manager

e. [email protected]
p. 1-800-949-4696
w. GoAnywhere.com | HelpSystems.com
2 posts Page 1 of 1