Midrange News for the IBM i Community


Posted by: Chris Proctor
Programmer Analyst
Columbia Sports Company
Portland, OR
Data structure to a record format?
has no ratings.
Published: 03 Sep 2015
Revised: 03 Sep 2015 - 627 days ago
Last viewed on: 22 May 2017 (1166 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Data structure to a record format? Published by: Chris Proctor on 03 Sep 2015 view comments(2)

Hi all. I'm having a brain fart this morning...... I know I can define a data structure that can be used as the layout for a write to a flat file, but I can't remember how I need to code the moving of the data structure to the flat file record format prior to the write. Can someone please refresh my memory?

Thanks!

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: BrianR
Premium member *
Green Bay, WI
Comment on: Data structure to a record format?
Posted: 1 years 8 months 18 days 23 hours 26 minutes ago
Edited: Thu, 03 Sep, 2015 at 11:13:37 (627 days ago)

No need to move the data structure. If you make the data structure length the same as the file record length, then you would code the write like this:

Write filename dsname

Posted by: chrisp
Premium member *
Portland, OR
Comment on: Data structure to a record format?
Posted: 1 years 8 months 18 days 23 hours 13 minutes ago

Oh, awesome, Brian! Thanks!