define fields in file

 6 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
nlmoran
New Member Send Private Message
Posts: 0
New Member
I am trying to read the ACH file from PR160 It is a fixed 94 character record. I can read file with data initiater How do i define Fields?
Shane Jones
Veteran Member Send Private Message
Posts: 460
Veteran Member
Did you look at article 544932 on the knowledge base - looks like it would give you a decent start (Might not be as complete as you want but might help get the wheels turning.)
Shane Jones
Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
** Teach others to fish...
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
Check my blog entry for an example: http://consultdavidw.blog...andle-arrays-in.html
David Williams
Shane Jones
Veteran Member Send Private Message
Posts: 460
Veteran Member
David,

Is the Iterator all Java based. The Lawson document made it look much more GUI like??? I am planning to upgrade to Integrator so that I can create files from data, connect to other internal databases, etc. I am hoping that this will have a short learning curve... What do you think?
Shane Jones
Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
** Teach others to fish...
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
The Data Iterator is GUI and can read an external file or data from your flow.
From Lawson: If the Input Method is “File”, this field specifies the file name to read. If the Input Method field is
“Data”, this field should contain a reference to a ProcessFlow variable.

You can use the File Access node to write out to a file or append additional output to a file but you are basically writing out text (which you can format as CSV, etc.).

You can use the SQL Query node to read from databases and the SQL Update node to write to databases as long as you can connect to them via the JDBC (Java Database Connectivity) method and have permission within the database (you hard code the User name and Password to use for this within either the Login Properties or within the SQL nodes).
David Williams
John Henley
Send Private Message
Posts: 3351

Norm,

The DataIterator node is really meant for reading delimited files (i.e. iterating over something), not for reading fixed-format files.  If it's a simple file, you could parse it up using the data iterator based on bytes, etc. but it would probably be pretty complicated if it's more than a few fields, and the DataIterator is not the fastest. 

BTW, here's another post that shows how to read in a delimited file (i.e. how to reference the fields using *_outputData1, *_outputData2, etc. :https://www.lawsonguru.co...w/topic/Default.aspx

To read in something like an ACH file, or a any other fixed-format file, I recommend the DataStage TX node (i.e. The "Mercator" node).  It's a true data mapping tool, and it's perfect for this type of application. 

Thanks for using the LawsonGuru.com forums!
John
nlmoran
New Member Send Private Message
Posts: 0
New Member

John:

Can you tell me a little more about parseing within DataIterator? 

 I only have a few  fields to extract.

 

I am just starting reading the downloaded documentation DataStage TX.

that's a powerfull tool