Passing Prototyped

Parameters

 

 

 

 

 

 

*-----------------------------------------------------------------

 

 

 

*

* 'Program 2'- Use of FMTADDR before province parameter was a￿dded.*

*-----------------------------------------------------------------

 

 

 

*

C

 

DO

2

X

5 0

C

 

CALLP

FMTADDR (Address:Street#2(X):

 

C

 

 

StreetNam2(X):City2(X))

 

C

 

EXCEPT

 

 

 

C

 

ENDDO

 

 

 

*-----------------------------------------------------------------

 

 

 

*

* 'Program 3' - Use of FMTADDR after province parameter was ad￿ded.*

*-----------------------------------------------------------------

 

 

 

*

C

 

DO

2

X

5 0

C

 

CALLP

FMTADDR (Address:Street#3(X):

 

C

 

 

StreetNam3(X):City3(X):Province3(X))

C

 

EXCEPT

 

 

 

C

 

ENDDO

 

 

 

C

 

SETON

 

 

LR

*-----------------------------------------------------------------

 

 

 

*

* Print the address.

 

 

*

*-----------------------------------------------------------------

 

 

 

*

OQSYSPRT

E

 

 

 

 

O

 

Address

 

 

**

 

 

 

 

 

00123Bumble Bee Drive

 

 

 

 

01243Hummingbird Lane

 

 

 

 

**

 

 

 

 

 

00003Cowslip Street

Toronto

 

 

 

01150Eglinton Avenue

North York

 

 

 

**

 

 

 

 

 

00012Jasper Avenue

Edmonton

 

Alberta

 

00027Avenue Road

 

Sudbury

 

Ontario

 

 

 

 

 

 

 

Figure 70 (Part 2 of 2). Source for procedure PRTADDR

To create these programs, follow these steps:

1. To create FMTADDR, using the source in Figure 68 on page 142, type

CRTRPGMOD MODULE(MYLIB/FMTADDR)

2. To create PRTADDR, using the source in Figure 70 on page 144, typ

CRTRPGMOD MODULE(MYLIB/PRTADDR)

3. To create the program, PRTADDR, type:

CRTPGM PGM(MYLIB/PRTADDR) MODULE(PRTADDR FMTADDR)

4. Call PRTADDR. The output is shown below:

123 Bumble Bee Drive, Toronto, Ontario

1243 Hummingbird Lane, Toronto, Ontario

3 Cowslip Street, Toronto, Ontario

1150 Eglinton Avenue, North York, Ontario

12 Jasper Avenue, Edmonton, Alberta

27 Avenue Road, Sudbury, Ontario

Passing Less Data Than Required

When a parameter is prototyped, the compiler will check to see that appropriate for the parameter. If the callee has indicated (throu through that prototype) that a parameter can be shorter than the ma you can safely pass shorter parameters.

Chapter 10. Calling Programs and Procedures145

Page 169
Image 169
IBM AS/400 manual Passing Less Data Than Required, Parameters, To create PRTADDR, using the source in on page 144, typ

AS/400 specifications

The IBM AS/400, now known as the IBM iSeries, is a midrange computer system that has been a cornerstone of enterprise computing since its introduction in 1988. Designed to provide a robust platform for business applications, the AS/400 is celebrated for its reliability, scalability, and integrated database capabilities.

One of the key features of the AS/400 is its Integrated Operating Environment, which blends hardware and software resources seamlessly. This integration allows businesses to execute diverse workloads, ranging from traditional applications to modern web-based services, all on a single platform. The operating system, OS/400 (now IBM i), offers a rich set of APIs and tools for developers, simplifying application development and management.

Another standout characteristic of the AS/400 is its built-in database, DB2 for i. This powerful relational database management system allows for efficient data handling and provides advanced features such as support for SQL, XML, and JSON, making it easier for businesses to manage their data and integrate it with other systems. The database's tight integration with the operating system enables high performance and security.

In terms of scalability, the AS/400 can accommodate small businesses as well as large enterprises, with the ability to support hundreds of users simultaneously. Its architecture allows for easy upgrades in hardware, meaning that organizations can scale their systems without replacing the entire infrastructure.

Security is another critical attribute of the AS/400. With a sophisticated security model, it offers built-in user authentication, access control, encryption, and auditing capabilities to protect data and applications from unauthorized access.

The AS/400 also supports multiple programming languages, including RPG, COBOL, Java, and PHP, giving organizations the flexibility to choose the development tools that best fit their needs. This diversity helps maintain legacy applications while also developing new ones that leverage modern technologies.

Moreover, the platform supports both traditional green-screen interfaces and modern graphical user interfaces, allowing organizations to transition smoothly into contemporary user experience paradigms.

Overall, the IBM AS/400 stands out as a resilient, flexible, and secure computing platform that enables organizations to effectively manage their business operations, streamline processes, and adapt to changing market demands. Its unique combination of integrated features and capabilities ensures that it remains relevant in today's fast-paced technology landscape.