Programming / APIs


The API Corner: Determining Key Values PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 20 March 2013 00:00

Let's return to the Retrieve Database File Description (QDBRTVFD) and Copy Numeric Value (CPYNV) APIs.

bruce viningWritten by Bruce Vining

In developing a general-purpose utility to detect decimal data errors, we have made use of a few APIs. In the article "In Search of Decimal Data Errors," we saw how the List Fields (QUSLFLD) API can be used to find all numeric fields, within a user-specified file record format, that are defined as either zoned decimal or packed decimal. In addition to discovering the data type of each field, we were also able to determine the name of the field, the number of decimal positions, the number of digits to the right of the decimal point, the number of bytes used to store the field value, and the starting location of the field within the record format.

Add a comment
Last Updated on Wednesday, 20 March 2013 00:00
Read more...
 
The API Corner: Diagnosing Decimal Data Errors PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 20 February 2013 00:00

Consider the advantages of the Convert Hex to Character (cvthc) API.

bruce viningWritten by Bruce Vining

In developing a general-purpose utility to detect decimal data errors, we have made use of a few APIs. In the article "In Search of Decimal Data Errors," we saw how the List Fields (QUSLFLD) API can be used to find all numeric fields, within a user-specified file record format, that are defined as either zoned decimal or packed decimal. In addition to discovering the data type of each field, we were also able to determine the name of the field, the number of decimal positions, the number of digits to the right of the decimal point, the number of bytes used to store the field value, and the starting location of the field within the record format.

Add a comment
Last Updated on Wednesday, 20 February 2013 00:00
Read more...
 
User Rating: / 1
PoorBest 
Simon's Solutions: Prepared to Be Surprised by QCMD? PDF Print E-mail
Programming - APIs
Written by Junlei Li   
Wednesday, 06 February 2013 00:00

Learn the practical techniques to take advantage of the IBM-supplied request processors.

junlei liWritten by Junlei Li

In a shell environment (for example, a UNIX Shell environment, or the QShell or PASE Shell environment provided by IBM i), you can run a list of commands all at once by simply separating the commands by semicolon (;) operators. For example, to obtain an estimated running time of a time-consuming program, you can invoke the target program in a QShell or PASE Shell session via the following list of Shell commands:

Add a comment
Last Updated on Wednesday, 06 February 2013 00:00
Read more...
 
User Rating: / 3
PoorBest 
The API Corner: Detecting Decimal Data Errors PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 16 January 2013 00:00

Take advantage of the Copy Numeric Value (CPYNV) MI instruction.

bruce viningWritten by Bruce Vining

Last month, in the article "In Search of Decimal Data Errors," we saw how the List Fields (QUSLFLD) API can be used to find all numeric fields, within a user-specified file record format, that are defined as either zoned decimal or packed decimal. This month, we'll look at one approach to testing the values of each of these zoned decimal and packed decimal fields for decimal data errors.

Add a comment
Last Updated on Wednesday, 16 January 2013 00:00
Read more...
 
The API Corner: In Search of Decimal Data Errors PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 19 December 2012 00:00

This tool enables the FndDDE program to easily find all numeric fields, which is a pre-req to finding field values that result in a decimal data error.

bruce viningWritten by Bruce Vining

Have you ever had an application program that failed with message MCH1202 – Decimal data error? If not, good for you! But for everyone else, and there are many of us, this is one dreaded error message. Alex M. recently asked if a utility program could meet the following requirements:

Add a comment
Last Updated on Tuesday, 18 December 2012 09:30
Read more...
 
User Rating: / 4
PoorBest 
The API Corner: Processing the QLOCALE System Value PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 21 November 2012 00:00

Find out how to use internationalized IFS path names.

bruce viningWritten by Bruce Vining

This is the fourth in a series of articles related to dynamically accessing and processing system values. In the first article, "In Search of System Values," we saw how the Retrieve Command Definition (QCDRCMDD) API could be used to access the list of valid system values for the release of the IBM i our program is running on. This list of valid system values was retrieved by using the IBM-provided Display System Value (DSPSYSVAL) command and by then accessing the list of special values associated with the SYSVAL keyword.

Add a comment
Last Updated on Monday, 19 November 2012 14:06
Read more...
 
The API Corner: Performing CCSID Conversions Under Program Control PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 17 October 2012 00:00

Learn how to use the iconv() API.

bruce viningWritten by Bruce Vining

For the last two months, in the articles "In Search of System Values" and "Accessing System Values," we've been using the subprocedure ConvertBuffer() to convert the UTF-8 (CCSID 1208) encoded XML output of the Retrieve Command Definition (QCDRCMDD) API to the CCSID of the running job. In those articles, any discussion of the ConvertBuffer() subprocedure was deferred to a later article. This is that "later" article. The source for the subprocedure we'll be discussing is shown below.

Add a comment
Last Updated on Wednesday, 17 October 2012 00:00
Read more...
 
User Rating: / 1
PoorBest 
The API Corner: Accessing System Values PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 19 September 2012 00:00

Use the Retrieve System Values API.

bruce viningWritten by Bruce Vining

Last month's article demonstrated how the Retrieve Command Definition (QCDRCMDD) API could be used to access the list of SYSVAL special values associated with the DSPSYSVAL command, thereby removing the need to know in advance what system values are valid for the system the program is running on. The sample program then loaded these special value names into the array SysVals. This month, we'll look at how the Retrieve System Values (QWCRSVAL) API can be used to access the values associated with each system value name found in SysVals. For demonstration purposes, we'll display the various system values using a subfile.

Add a comment
Last Updated on Wednesday, 19 September 2012 00:00
Read more...
 
User Rating: / 1
PoorBest 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 4 of 20

WEBCAST

MC Webcast CenterFEATURED WEBCAST

See What i Can Do With Modern RPG Development

Your applications deserve more than just a new look! Change the perception of the IBM i as “old” with modern development tips from IBM and Profound Logic Software.
Watch as Barbara Morris, Brian May and Alex Roytman dive beneath the GUI surface to show the benefits of:

 

  • Working with free-format RPG in IBM i TR7
  • Breaking free from “The Cycle” of traditional RPG development
  • Going beyond the 10 character limit in display and database files
  • And more!

You'll also see a live demonstration of these techniques as the presenters create a modern web application before your eyes! 

 

Watch the Webinar Now!

 

TRIAL SOFTWARE

MS Office Connector for Query/400

NGS' Qport Office enables Windows users to run IBM Query/400 queries to: 

 - Create and update Excel spreadsheets and Access databases

 - Create Word documents

 - Send to Windows screen and PC printers

No query conversion is required. Works with i5/OS V5R1 & above. Installs in minutes!

If you don’t have a budget to replace IBM Query/400, but want your users to have one click enhanced output of their queries.… Request the online license agreement and product download instructions today!

Offer good through December 31, 2013.

   MC-STORE.COM