once a physical file has been created, how can data be loaded into it? zdfu zsql zcopy file zwrite a...

12
Once a physical file has been created, how can data be loaded into it? DFU SQL Copy File Write a program

Upload: jessica-small

Post on 29-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Once a physical file has been created, how can data be loaded into it?

DFUSQLCopy FileWrite a program

Page 2: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

List all of the steps required to create a program described file and to put data into it.

Use the CRTPF command to create the file with a specific record length

Use a ‘Copy’ command to copy data into the file, or SQL, or write a program, or DFU.

Page 3: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Working with Query/400

Page 4: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Query/400

Report Generator ToolCreates objects with the type

*QRYDFN

Page 5: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Query/400 does the following:

Selection and arrangement of records in a fileSelection and placement of fieldsSpecification of report breaksAbility to examine a report layout and

preview a reportAbility to print a report based on the contents

of one or more files without programming.Ability to create a file based on the contents

of one or more files without programming.

Page 6: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

To access Query/400 use the commands:

STRQRY or WRKQRY

Page 7: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Creating A Query

Select option 1 from Work with QueriesEnter query name and library where it is to

be storedPress enter!

Page 8: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Defining the Query

You are presented with a list of selections. Place a 1 in the opt field beside those you want to use. The only one you must choose is File Selection.

Choose other selections as needed for sorting, editing fields, selecting of records, defining new fields, selecting output type, etc.

Page 9: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Query Demo

Single FileMultiple Files

Page 10: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Helpful Tips

Remember to hit ENTER after making your selections

Use the ampersand (&) to indicate a space in edit words

You can use field names in text areas by specifying the field name with an & in front of it. Eg. &DEPT Totals would yield text of Accounting Totals if DEPT was Accounting

Page 11: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

Creating a Permanent DFU

STRDFU, option 2 to create a DFUname the DFU and choose the filedefine general information screen:

accept defaultsdefine Audit control: accept defaultswork with record formats: select formatselect and sequence fieldswork w/fields: select #2 to change

headings, do editing, validation, etc

Page 12: Once a physical file has been created, how can data be loaded into it? zDFU zSQL zCopy File zWrite a program

DFU demo