Você está na página 1de 86

COOL:2E

Release Summary
7.0

This documentation and related computer software program (hereinafter referred to as the Documentation) is for the end users informational purposes only and is subject to change or withdrawal by Computer Associates International, Inc. (CA) at any time. THIS DOCUMENTATION MAY NOT BE COPIED, TRANSFERRED, REPRODUCED, DISCLOSED OR DUPLICATED, IN WHOLE OR IN PART, WITHOUT THE PRIOR WRITTEN CONSENT OF CA. THIS DOCUMENTATION IS PROPRIETARY INFORMATION OF CA AND PROTECTED BY THE COPYRIGHT LAWS OF THE UNITED STATES AND INTERNATIONAL TREATIES. TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION AS IS WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, GOODWILL OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE. THE USE OF ANY PRODUCT REFERENCED IN THIS DOCUMENTATION AND THIS DOCUMENTATION IS GOVERNED BY THE END USERS APPLICABLE LICENSE AGREEMENT. The manufacturer of this documentation is Computer Associates International, Inc. Provided with Restricted Rights as set forth in 48 C.F.R. Section 12.212, 48 C.F.R. Sections 52.227-19(c)(1) and (2) or DFARS Section 252.227.7013(c)(1)(ii) or applicable successor provisions.

2000 Computer Associates International, Inc., One Computer Associates Plaza, Islandia, New York 11749. All
rights reserved. All product names referenced herein belong to their respective companies.

Contents

Chapter 1: Introducing COOL:2E Version 7.0


Quick Reference to Enhancements .............................................................. New COOL:2E Model Values............................................................... Changed COOL:2E Model Values ........................................................... Changed COOL:2E Commands ............................................................. New COOL:Xtras 400 Toolkit Features ...................................................... Contacting Technical Support .................................................................. 1-2 1-2 1-2 1-3 1-3 1-3

Chapter 2: RPGIV Generator


Choosing RPGIV as the Default Language ....................................................... 2-1 ILE Features That Affect COOL:2E .............................................................. 2-1 Program Creation ......................................................................... 2-2 Program Calling .......................................................................... 2-3 Generating RPGIV Source ..................................................................... 2-4 Control (H) Specifications .................................................................. 2-4 Compiling RPGIV Source ...................................................................... 2-4 Option O ................................................................................. 2-4 Option T ................................................................................. 2-5 The YBNDDIR Model Value ................................................................... 2-5 Specifying *NONE ........................................................................ 2-6 Specifying a Value Other Than *NONE ...................................................... 2-6 RPGIV User Source ........................................................................... 2-7 Model Value YRP4SGN........................................................................ 2-9 RPGIV Generator Notes ...................................................................... 2-10

Contents

iii

Chapter 3: Creating Wrappers to Reuse Business Logic


Selecting Action Diagram Statements ............................................................ 3-2 Selecting Function Name and Type .............................................................. 3-4 Automatic Parameter Interface Generation ....................................................... 3-5

Chapter 4: Duplicate Parameter Contexts


EXCEXTFUN and EXCINTFUN ................................................................ 4-1 Edit Function Parameters Panel ................................................................. 4-2 Parameter Context Field .................................................................... 4-2 Program Context Field ..................................................................... 4-2 Comparisons Using *ALLPARMS ............................................................... 4-3 Notes......................................................................................... 4-3

Chapter 5: Batch Processing Enhancements


*Relative record number Field .................................................................. 5-2 Internal Database Functions and PHY Access Paths ............................................... 5-2 Retrieve object (RTVOBJ) ................................................................... 5-2 Change object (CHGOBJ) ................................................................... 5-4 Delete object (DLTOBJ) ..................................................................... 5-5 Create object (CRTOBJ) ..................................................................... 5-6 Using Functions Built Over PHY Access Paths ................................................ 5-7

Chapter 6: Object Locking Enhancements


Locking an Object ............................................................................. 6-1 Object Locking Window........................................................................ 6-2

Chapter 7: Other Enhancements to COOL:2E


New Program Status Fields in JOB Context ...................................................... 7-1 *Job century Field Added to JOB Context ........................................................ 7-2 New Parameter Selection Options D, N, and X ................................................... 7-3 *NLL Default Parameter Context Added to YDFTCTX Model Value ................................ 7-3

iv

COOL:2E Release Summary

Chapter 8: Enhancements to COOL:Xtras 400 Toolkit


Convert Spooled File (YCVTSPLF) .............................................................. Parameters ............................................................................... Example .................................................................................. Execute Batch FTP Session (YEXCFTP) .......................................................... 8-1 8-2 8-5 8-8

Appendix A: Fix Notes


New Fixes in Version 7.0 ....................................................................... A-1 Fixes on PTF Tapes ...........................................................................A-10 62070 ...................................................................................A-10 62060 ...................................................................................A-11 62050 ...................................................................................A-12 62040 ...................................................................................A-15 62030 ...................................................................................A-18 62010 ...................................................................................A-19

Index

Contents

Chapter

Introducing COOL:2E Version 7.0


This COOL:2E Release Summary explains the new features and enhanced features that are included in version 7.0 of COOL:2E. Also updated for version 7.0 are the COOL:2E Installation Guide and the Readme file. The other documents on the documentation CD have not been updated for version 7.0; they contain exactly the same information as for version 6.2, when COOL:2E was a product of Sterling Software. The changes in version 7.0 are:
I I

A new High Level Language (HLL) generator called RPGIV or RPG4 The ability to retrieve business logic and place it into separate functions with a wrapper A new option to Execute External Function (EXCEXTFUN) and Execute Internal Function (EXCINTFUN) that lets you specify up to nine duplicate parameter contexts Batch processing enhancements that improve the performance of generated applications Object locking enhancements that let you increase security and add a description of the lock Miscellaneous enhancements: new fields in the JOB context; new selection options on the Edit Function Parameters panel; new *NLL parameter context for the YDFTCTX model value Two new features for COOL:Xtras 400 Toolkit: Convert Spooled File command (YCVTSPLF) and Execute Batch FTP Session tool (YEXCFTP)

Introducing COOL:2E Version 7.0

11

Quick Reference to Enhancements

Quick Reference to Enhancements


This section provides a tabular overview of the new and changed model values and commands.

New COOL:2E Model Values


The following table is a summary of new model values in version 7.0 of COOL:2E. For details, see the chapter RPGIV Generator. Model Value Description YBNDDIR ILE binding directory Allowed Values (default is bold) *NONE, any valid OS/400 object name YBNDDIR Any RPGIV H-specification keywords H DATFMT(*YMD) DATEDIT(*YMD) DEBUG(*YES) Any RPGIV H-specification keywords H DATFMT(*YMD) DATEDIT(*YMD) DEBUG(*YES)

YRP4HSP

RPGIV H-spec (*PGM)

YRP4HS2

RPGIV H-spec (*MODULE)

YRP4SGN

RPGIV source generation See the chapter RPGIV Generator options for details UG

Changed COOL:2E Model Values


The following table is a summary of changed model values in version 7.0 of COOL:2E. Model Value Description YHLLGEN YDFTCTX Sets RPGIV as default HHL generator. Sets default parameter context. New Value *RPGIV *NLL For More Information RPGIV Generator chapter Release 6.2 Highlights on CD

12

COOL:2E Release Summary

Contacting Technical Support

Changed COOL:2E Commands


The following table is a summary of changed commands in version 7.0 of COOL:2E. For details, see the chapter RPGIV Generator. Command YADDSRCM Description Adds a source file member. Change SEUTYPE allows *RPGLE and *SQLRPGLE HLLGEN allows *RPGIV New parameter BNDDIR

YCRTMDLLIB Creates a model library.

New COOL:Xtras 400 Toolkit Features


The following table is a summary of a new command and a new tool in version 7.0 of COOL:Xtras 400 Toolkit. For details, see the chapter Enhancements to COOL:Xtras 400 Toolkit. Feature YCVTSPLF YEXCFTP Description Converts an AS/400 spooled file to a PC file. Lets non-technical people create and use FTP scripts.

Contacting Technical Support


For technical assistance with COOL:2E, contact the Customer Support Center at http://cool2.sterling.com/support.

Introducing COOL:2E Version 7.0

13

Chapter

RPGIV Generator
Before version 7.0 of COOL:2E, two high-level language (HLL) generators were available: RPG (RPGIII) and COBOL. COOL:2E now introduces a new HLL generator, RPGIV (also written as RP4). It generates RPGLE source in the QRPGLESRC source file.

Choosing RPGIV as the Default Language


To create a new model with RPGIV as the default language, use the YCRTMDLLIB command as follows:
YCRTMDLLIBHLLGEN(*RPGIV)

This value becomes the model value YHLLGEN. In addition, the default binding directory YBNDDIR is created in the generation library. To make RPGIV the HLL generator for an existing function, change the value on the Edit Function Details panel to RP4.

ILE Features That Affect COOL:2E


The IBM Integrated Language Environment (ILE) includes many enhancements and changes over the Original Program Model (OPM) that controls and supports RPG and COBOL programs. This section contains brief descriptions of the ILE features that the COOL:2E RPGIV ILE generator uses for program creation and program calling. Note: The RPGIV generator includes processing that can use such ILE features as bound (static) calls, activation groups, binding directories, and more. These features provide functionality that is not available for RPG or COBOL programs. A full understanding of ILE is therefore necessary for using the RPGIV generator. See the documentation from IBM or another source.

RPGIV Generator

21

ILE Features That Affect COOL:2E

Program Creation
In OPM, program creation consists of compiling source code into runnable program objects (*PGM). A program object is created from a single source member using the Create RPG Program command (CRTRPGPGM). By contrast, in ILE, program creation consists of:
I I

Compiling source code into nonrunnable module objects (*MODULE) Binding (combining) one or more modules into a runnable program object (*PGM)

One way to create an RPGIV program object is the same way you create an RPG program in the OPM framework: using the CRTBNDRPG command. This command creates a temporary module that is bound into a program object and later deleted. This is the quickest and simplest way to create an ILE program. Another way to create an RPGIV program object is using separate commands for compilation and binding. In this two-step process, you create a module object with the Create RPG Module command (CRTRPGMOD). This command compiles the source statements into a nonrunnable module object, which must be bound into a program object with the Create Program command (CRTPGM). ILE also lets you bind other objects using a binding directory. A binding directory is essentially a list of modules that may be needed when the program runs. When the CRTBNDRPG command specifies a binding directory, the compiler or binder searches the binding directory to see if the program being compiled accesses any modules in the directory. If it does, the compiler or binder binds them to the program. A binding directory can reduce program size because the modules or service programs in a binding directory are used only when needed. For more information about the binding directory, see the section The YBNDDIR Model Value. COOL:2E lets you define a function as either a module or a program. During the source generation and compilation steps, the RPGIV ILE generator ensures that references to bound objects are correct and creates either a program object (*PGM) or a module object (*MODULE). Created modules can be bound to created programs during compilation, either explicitly or through the default COOL:2E binding directory.

22

COOL:2E Release Summary

ILE Features That Affect COOL:2E

Program Calling
In ILE, you can write applications in which ILE RPG/400 programs and OPM RPG/400 programs interrelate by using the traditional dynamic program call. The calling program specifies the name of the called program on a CALL statement. The name of the called program is resolved to an address at run time, just before the calling program passes control to the called program. The program name may be known to the program only when the call is made (perhaps if the program to be called is a variable value). Because of this, the dynamic call uses considerable system resources, and repeated dynamic calls can reduce the performance of the calling program. You can also write ILE applications that interrelate with faster static calls. Static calls are calls between procedures. A procedure is a self-contained set of code that performs a task and then returns to the caller. An ILE RPG/400 module consists of an optional main procedure followed by zero or more subprocedures. Because the procedure names are resolved at bind time (that is, when you create the program), static calls are faster than dynamic calls.
Example

The COOL:2E generator uses static calls where possible. Suppose a model contains the following external functions: Function PGMgenerated in RPGIV, compiled as a program object (*PGM) Function MODgenerated in RPGIV, compiled as a module object (*MODULE) Function MOD2generated in RPGIV, compiled as a module object (*MODULE) Function RPGgenerated in RPG or COBOL, compiled as a program object (*PGM) In a model with the functions just listed, the following call situations occur: 1. 2. 3. 4. 5. Function PGM calls Function MOD, using the Call Bound Procedure statement (CALLB). Function MOD calls Function MOD2, using the CALLB statement. Function RPG calls Function PGM, using the Call Program statement (CALL). Function PGM calls Function RPG, using the CALL statement. Function RPG calls Function MOD, using the CALL statement. In this case, however, the call fails because RPG programs cannot call module objects using a dynamic call.

RPGIV Generator

23

Generating RPGIV Source

Generating RPGIV Source


The process to invoke source generation is the same as for RPG:
I I

Enter a G next to the function to generate the source interactively. Enter a J next to the function to generate the source and compile the object in batch.

After the source is generated, you can view or edit it by entering an E next to the function. The source file is QRPGLESRC and the source type is RPGLE.

Control (H) Specifications


The RPG generator uses the contents of the YRPGHSP model value as the Control (H) specification for the generated RPG source. The RPGIV generator, however, uses the contents of two separate model values: YRP4HSPControl (H) specification for objects of type *PGM YRP4HS2Control (H) specification for objects of type *MODULE In addition, and unlike the RPG generator, you can add extra H lines using user source; see the section RPGIV User Source. This is because the H-specification is keyword-based and can take more than 80 characters. Note: You can change the model values YRP4HSP and YRP4HS2 with YCHGMDLVAL, but they are too long to be displayed on the Display Model Values panel.

Compiling RPGIV Source


As stated earlier, you can compile generated RPGIV source into a program object (*PGM) with CRTBNDRPG or a module object (*MODULE) with CRTRPGMOD. To accommodate this choice between object types, the Edit Function Details panel has two new options, O and T:
SEL: E-STRSEU, O-Compiler Overrides, T-ILE Compilation Type (*PGM/*MODULE)

Option O
The O option controls the compiler overrides. Use this option if you want additional binding directories (to use IBM APIs, for example). Because the CRTBNDRPG and CRTRPGMOD commands have different default values, changing the object type with the T option deletes any compiler overrides for the previous object type.

24

COOL:2E Release Summary

The YBNDDIR Model Value

Option T
The T option toggles between PGM (*PGM) and MOD (*MODULE) as the object type created when the source is generated and compiled. This option is available only for a target HLL that is ILE compatible, like RPGIV. The current object type is shown at the left of the subfile line. During generation, the change is limited to the compiler overrides in the source (the Z* lines). Here are more details about the compile options:
I

PGM The IBM Create Bound RPG Program command (CRTBNDRPG) compiles the generated source into a program object (*PGM). The command creates a temporary module, binds that module into a program, and then deletes the temporary module. The defaults for this command are in the *CRTBNDRPG message in the *Messages file:
CRTBNDRPG PGM(&2/&1) SRCFILE(&3/QRPGLESRC) DFTACTGRP(*NO) BNDDIR(&YBNDDIR) DBGVIEW(*SOURCE) CVTOPT(*DATETIME) ACTGRP(*CALLER) OPTIMIZE(*BASIC)

For details about the BNDDIR parameter value, see the section The YBNDDIR Model Value.
I

MODThe IBM Create RPG Module command (CRTRPGMOD) compiles the generated source into a module object (*MODULE). You must then bind that module into an ILE program, possibly with other modules. The defaults for this command are in the *CRTRPGMOD message in the *Messages file:
CRTRPGMOD MODULE(&2/&1) SRCFILE(&3/QRPGLESRC) DBGVIEW(*SOURCE) CVTOPT(*DATETIME)

The YBNDDIR Model Value


The new model value YBNDDIR specifies a binding directory that can resolve the location of any previously compiled RPGIV modules. Use this model value while compiling RPGIV programs with the CRTBNDRPG command. The default CRTBNDRPG command contains the following parameter:
BNDDIR(&YBNDDIR)

During the pre-compiler process, the value &YBNDDIR is replaced with the value specified for the YBNDDIR model value, even if the value specified in the YBNDDIR model value is *NONE.

RPGIV Generator

25

The YBNDDIR Model Value

Specifying *NONE
A value of *NONE for the YBNDDIR model value causes the following:
I

No static binding takes place during RPGIV program compilation. RPGIV programs use:
CRTBNDRPG...BNDDIR(*NONE)

RPGIV modules must be explicitly bound to a generated RPGIV program. Change the compile overrides for that RPGIV program function by taking option O from the Edit Function Details panel. In addition, specify a binding directory that already has an entry for each module.

Specifying a Value Other Than *NONE


A value other than *NONE for the YBNDDIR model value causes the following:
I

The compiler attempts to bind any called modules by checking the binding directory for each called module. RPGIV programs use:
CRTBNDRPG...BNDDIR(binding-directory)

RPGIV modules generated with the CRTRPGMOD command have the following Y* (pre-compiler) line inserted before the Z* (compile parameter) lines:
Y* ADDBNDDIRE BNDDIR(binding-directory) OBJ((source-member *MODULE))

This adds an entry for the *MODULE function to the specified binding directory at compile time. Any external functions compiled later with CRTBNDRPGBNDDIR that call a *MODULE function use the Call Bound Procedure statement (CALLB). This improves performance. However, make sure that a called module is compiled before the program that calls it, otherwise the compilation will fail because no entry for the module will be in the binding directory. If several objects are compiled at once, the job list processing ensures this. Note: If you use YCHGMDLVAL to change YBNDDIR to a value other than *NONE, the command processor determines whether a binding directory of that name already exists in the generation library. If it does not, a directory is created with PUBLIC(*CHANGE) authority.

26

COOL:2E Release Summary

RPGIV User Source

RPGIV User Source


Functions generated with source type RP4 should include only user source of the type RP4. This user source lets you take advantage of some features of the RPGIV language that are not currently available in the COOL:2E model generated source. An example is the use of pointer variables. RPGIV user source must reside in QRPGLESRC. The rules for naming parameter variables in RPGIV user source are the same as for RPGIII user source. You can include all RPGLE specification types in the source member. COOL:2E sorts the specification types into their appropriate positions within a program. COOL:2E codes the source in the normal order for RPGLE specifications, which is: 1. H specification. Any H specification lines that you add are placed after the default H specification lines generated for the owning function source. The H specifications are taken from the YRP4HSP and YRP4HS2 model values. F specifications. D specifications. I specifications. C specifications. O specifications. P specifications, including any contained D and C specifications. Arrays.

2. 3. 4. 5. 6. 7. 8.

COOL:2E treats the first RPG calculation specifications, which are not part of a subroutine, as the instance code. For repeated calls to an EXCUSRSRC function, COOL:2E generates the code on every call to the function at the point indicated by the action diagram. COOL:2E automatically inserts into the ZZINIT subroutine any C specifications that follow a subroutine but are not part of a subroutine. The order of specification is: 1. 2. 3. Instance (mainline) code C specifications C specifications for subroutines called by instance code Initialization C specifications

Note: In version 7.0, parameter fields (fields prefixed with #O, #I and #B) are recognized only in the Factor One, Factor Two, and Result positions of the RPGLE calculation specifications that are part of the instance code. They can be in upper, lower, or mixed case. They are not currently recognized in free-format expressions.

RPGIV Generator

27

RPGIV User Source

Example of an EXCUSRSRC Function

The following example shows an RPGIV function called Get Key that is defined into another COOL:2E standard function. The EXCUSRSRC function has three parameters: IOB I I O Parameter Job date User name Encoded file key GEN name JDT USR ABVN

The sample shows user source coded as a prototyped procedure with several distinct sections of code:
I I I

The procedure prototype (D specifications) Inline code (to execute the procedure) Procedure code (including more C and D specifications)
) Inserted into ) inline D-specs ) )

* PROCEDURE PROTOTYPE D Get_Key PR 10 D Job_Date 7 0 VALUE D Job_User 10 VALUE * * USER_DEFINED FIELDS D Key_Date S 7 0 D Key_User S 10 D Enc_Val S 10 * * IN-LINE PROCESSING * * Use job date and user name as input parameters to Get_Key proc. C Move #ijdt Key_Date C Move #iusr Key_User C Eval Enc_Val = Get_Key(Key_Date:Key_User) * * Return encoded value as parameter from user source function C Move Enc_Val #oadvn * * * PROCEDURE DEFINITION PGet_Key B *- - - - - - - - - - - - - - - - - - - -- - - - - - - * DGet_Key PI 10 D Job_Date 7 0 VALUE D Job_User 10 VALUE * D Job_Date_Ptr S * D Job_Date_Char S 7 Based(Job_Date_Ptr) D File_Key S 10 * C Move Job_Date Job_Date_Char C Eval File_Key = %Subst(Job_User:3:2) + C %Subst(Job_Date_Char:3:3) + C %Subst(Job_User:6:2) + C %Subst(Job_Date_Char:1:3) C Return File_Key P E

) ) Inserted into ) inline C-specs ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )

Inserted into source after all C-specs and all systemgenerated procedure code

28

COOL:2E Release Summary

Model Value YRP4SGN

Note that user source procedure code need not conform to the COOL:2E model naming conventions. Field names used only in the procedure can have the full 14 characters that the RPGIV language allows. Also note that #I and #O must be within C specification lines, and not within free-format expressions like the EVAL statement.

Model Value YRP4SGN


The RPGIV generator includes some source generation options that you can set at a model level. These options are in the new model value YRP4SGN in a data area called YRP4SGNRFA (RPGIV source generation options). YRP4SGNRFA is a 16-character data area, and a copy is created in each version 7.0 model library. The 16 characters are:
I

Character 1This character determines whether the RPGIV source is in upper case, lowercase or mixed case: Uupper case (default) Llowercase Mmixed case (first letter in upper case) If Character 1 is L or M, subroutine names and internal TAG labels are upper case.

Character 2This character determines the color of the comments in the generated RPGIV source: Ggreen (default) Wwhite Rred Ppink Bblue Characters 3 - 16These are not used in version 7.0, but are available for future use.

The default value, which is UG, means that the RPGIV source is upper case with green comments. If you change the value to MW, the source would be mixed case with white comments. Therefore, RPG would generate a field name as WUABVN, but RPGIV generates it as Wuabvn. Likewise, op-codes such as EVAL, IF, and SETOFF are Eval, If, and Setoff.

RPGIV Generator

29

RPGIV Generator Notes

RPGIV Generator Notes


The RPGIV ILE generator lets you create ILE programs and modules from generated RPGIV source. However, for version 7.0 of COOL:2E, note the following details and limitations:
I

Unlike the RPG and COBOL generators, the RPGIV generator is available free of charge to any customer who already has a fully licensed COOL:2E model. For administration purposes, however, it is licensed separately, and you must specifically request the license. Although the RPGIV generator options can create both *PGM and *MODULE objects, the CRTPGM and CRTSRVPGM commands are not currently available to create an ILE program or service program. The CRTBNDRPG and CRTRPGMOD default commands are held as the *CRTBNDPRG and *CRTRPGMOD messages Y2U1022 and Y2U1024 respectively in the *Messages file. If you wish, you can change the default parameters or add new parameters.

210

COOL:2E Release Summary

Chapter

Creating Wrappers to Reuse Business Logic


Version 7.0 of COOL:2E lets you easily retrieve user-written business logic, such as validation routines, and place them into separate functions by using wrappers. These functions can then be accessed by other COOL:2E functions or by external procedures such as COOL:Plex functions. The process has two parts: 1. 2. Select the action diagram statements that you want to place into other functions. Select a function type and name. An automated process copies the statements and places them in a new function with an automatically generated parameter interface.

Creating Wrappers to Reuse Business Logic

31

Selecting Action Diagram Statements

Selecting Action Diagram Statements


You can select the action diagram statements from a User Point or from the Notepad.
From a User Point

Follow these steps: 1. 2. While editing the action diagram of a function, press F5 to view the User Exit Points. Enter W next to the User Point that contains all the statements you want to place in another function by using a wrapper.

3.

Go to the section Selecting Function Name and Type.

32

COOL:2E Release Summary

Selecting Action Diagram Statements

From the Notepad

In some cases, it may not be desirable or necessary to use a wrapper on an entire User Point. The User Point may contain statements that you do not want in the new function. Or perhaps the final function needs additional statements that are not required in the original function. You can edit User Point action diagram statements, place the whole User Point in a wrapper, and then exit the function without saving to preserve the original User Point. An easier and more flexible approach, however, is using the Action Diagram Editor Notepad. Note: Because EXCEXTFUN and EXCINTFUN have no User Points, use Notepad to place statements from these types of functions in a wrapper. Use the Notepad commands N, NA, NAA, NI, NR, and NRR to put the required statements into the Notepad. 1. 2. Press F18 to view the *Notepad. Press F5 to select all the statements in the Notepad.

Creating Wrappers to Reuse Business Logic

33

Selecting Function Name and Type

Selecting Function Name and Type


After selecting the action diagram statements for the wrapper, you must assign a function name and type.

The default values that appear in the Create Wrappered Function panel depend on whether you started the procedure from a User Point or from the Notepad: From a User PointThe default Function File, which will own the new function, is the same file that owns the function that contained the User Point. The default Function name is the first 25 characters of the User Point name. From the NotepadThe default Function File is ?, therefore you must choose the function name. The default Function name is blank. In either case, the default Function type is E for EXCEXTFUN, but you can change it to I to create an EXCINTFUN. The final step is to press Enter. An Execute External Function or Execute Internal Function is created. The selected statements are copied from the Notepad or the User Point into the newly created function.

34

COOL:2E Release Summary

Automatic Parameter Interface Generation

Automatic Parameter Interface Generation


The function placed in a wrapper creates parameters automatically based on the field contexts used in the original action diagram statements. Some contexts do not require conversion; these contexts are LCL, NLL, PGM, JOB, and CON. All other contexts are converted and passed into the new function as duplicate parameters. EXCEXTFUN and EXCINTFUN functions do not have associated screens or database fields, so the action diagram cannot refer to contexts such as RCD, CTL, DB1, and DB2. For each field in an unavailable context, the wrapping process creates an entry on an array. A new array is created for each function placed in a wrapper. This array is then defined on the parameter listing for the function passed as RCD. Each new unavailable context is associated with another parameter entry of the same array. Each array is passed as a duplicate parameter context, from PR1 to PR9. The first unavailable context on the action diagram statements is assigned to PR1. The next context not already assigned to the array is passed as the PR2 parameter context, and so on. LCL, NLL, PGM, JOB, and CON are never substituted. The parameter usage for each field on each parameter listing is calculated from how the CTX field is used in the action diagram statements of the function.

Creating Wrappers to Reuse Business Logic

35

Automatic Parameter Interface Generation

The following illustrations show how the field contexts are converted to the PR1 to PR9 contexts.
Original Contexts

Edit Customer is a function of the type EDTFIL.

In this example, the code in USER: Validate subfile record fields is placed in a wrapper. This example shows parameter substitution, not application design. This code populates CTL.Customer Code with RCD.Customer Code, sets RCD.Customer Code to CON.A, and checks whether CTL.Billing Location is equal to WRK.Delivery Location. If it is, WRK.Customer Check Flag is set to Y and PGM.*Sbmjob receives the override string CON.*BLANK. 1. 2. Press F5 to select User Points, and enter W for the relevant one. Choose the function name Update Override String.

The function and the parameter interface are created and contexts are substituted for any contexts unavailable to the EXCEXTFUN. CTL is the first unavailable context, so an array is created for this function. The array name consists of the first 22 characters of the function name plus PAR at the end.

36

COOL:2E Release Summary

Automatic Parameter Interface Generation

The Newly Created Function

Creating Wrappers to Reuse Business Logic

37

Automatic Parameter Interface Generation

The Newly Created Array

A new array USER: Validate subfile PAR is created. It contains an entry for each field in the original function in a context that is not available in the newly created EXCEXTFUN.

38

COOL:2E Release Summary

Automatic Parameter Interface Generation

The Parameter Definitions

The array then establishes parameters on the created function. It is passed once for each context that is being substituted. The Pgm Ctx and Par Ctx columns show the original and substituted contexts.

Creating Wrappers to Reuse Business Logic

39

Automatic Parameter Interface Generation

The Control Context

Two fields were used in the CTL context in the original action diagram: Customer Code and Billing Location ID. Thus both fields are specified as parameters for the first array entry. Notice how the usage matches the usage of the fields in the original action diagram. If the field was used as a target of an operation, the usage defaults to Output. If the field was used as input to an operation, the usage defaults to Input. After conversion, the former CTL context is now the PR1 context.

310

COOL:2E Release Summary

Automatic Parameter Interface Generation

The Record Context

For the RCD context entry, only one field is specified as a parameter. The usage B (Both) matches the usage of the field in the original action diagram. The field Customer Code was used as both input and as the target of a *Move statement. After conversion, the former RCD context is now the PR2 context.

Creating Wrappers to Reuse Business Logic

311

Automatic Parameter Interface Generation

The WRK Context

The WRK context entry matches the usage of the field in the original action diagram statements. After conversion, the former WRK context is now the PR3 context.

312

COOL:2E Release Summary

Automatic Parameter Interface Generation

The New Action Diagram

The new action diagram looks like the old one except for the substituted contexts. If a reference to an RCD context had appeared first, instead of the CTL context, then the order of substitution would be different. PR1 would have been RCD. The newly created function can now be used and called in the usual manner.

Creating Wrappers to Reuse Business Logic

313

Chapter

Duplicate Parameter Contexts


The new Duplicate Parameters Contexts feature overcomes the design limitation in previous versions of COOL:2E that a function can use a field only once as a parameter within the PAR context. This means that if a function needs to compare two sets of the same fields (for example, two record formats), you must create duplicate fields to pass as parameters. This duplication can result in many copies of the same field that are used as separate parameters to a single function. This design limitation exists because of the single PAR context. The new feature allows up to nine duplicate parameter contexts.

EXCEXTFUN and EXCINTFUN


The Execute External Function (EXCEXTFUN) and Execute Internal Function (EXCINTFUN) function types have a new function option called Duplicate Parameters. It is a Yes/No flag: N (the default)Makes the function behave as it currently does, with one PAR context. YLets the function have up to nine duplicate parameter contexts called PR1 through PR9. The PAR context is not available in the Action Diagram Editor.

Duplicate Parameter Contexts

41

Edit Function Parameters Panel

Edit Function Parameters Panel


The Edit Function Parameters panel has two new fields for each parameter definition line: Parameter Context and Program Context.

Parameter Context Field


The Parameter Context field is used in the Action Diagram Editor and is automatically named PRn where n is the parameter sequence number. A function can have a maximum of nine duplicate parameter contexts, therefore the values for this field are PR1 through PR9. Use a duplicate parameter context in the action diagram wherever the PAR context is valid.

Program Context Field


The Program Context field can be any three-character value that a user enters. This value is displayed when the description of the related parameter context is shown. If the field is left blank, it defaults to the value in the Parameter Context field. This value is not used in the action diagram; it merely provides documentation for each parameter context. To enter or change the program context and an associated description, use the subfile option N on the Edit Function Parameters panel. The Program Context field appears in the Edit Action - Function Details window in the following situations:
I

Calling a function with Duplicate ParametersWhen a function calls another function with duplicate parameter contexts, the program context appears in the Edit Action - Function Details window to the right of the line with a duplicate parameter context like PR1. Displaying Duplicate Parameters in the Action DiagramWhen a *Built-in function or CASE statement is used in the action diagram of a function with duplicate parameters, the program context appears in the Edit Action Function Details panel to the right of the line with a duplicate parameter context like PR1.

42

COOL:2E Release Summary

Comparisons Using *ALLPARMS

Comparisons Using *ALLPARMS


For EXCEXTFUN only, the CASE and REPEAT WHILE built-in functions allow comparisons between entire parameter contexts using the pseudo-field *ALLPARMS:
.-CASE -PR1.*ALLPARMS EQ PR2.*ALLPARMS '-ENDCASE

This structure generates code that compares the parameter data structures, which are named PnPARM, as shown in the following examples: RPGIII:
* CASE: PR1.*ALLPARMS EQ PR2.*ALLPARMS C P1PARM IFEQ P2PARM *IF

RPGIV:
* CASE: PR1.*ALLPARMS EQ PR2.*ALLPARMS C IF P1PARM = P2PARM

COBOL:
* * CASE: PR1.*ALLPARMS EQ PR2.*ALLPARMS *IF IF (P1PARM = P2PARM) THEN

Note: Use *ALLPARMS only in action diagram comparison statements such as CASE and REPEAT WHILE.

Notes
Here is some additional information about Duplicate Parameter Contexts.
I

In the Action Diagram Editor, F22 displays the current duplicate parameter contexts, the related program contexts, and their descriptions. We do not recommend that you change existing functions to use duplicate parameter contexts. User error is possible during the manual conversion of the action diagram code from the single PAR parameter context to the duplicate parameter contexts PR1 through PR9. The YGENSRC job fails if a reference to PAR exists in a function using duplicate parameters. Use the Action Diagram FIND SERVICES (F17) Find Error utility to locate references to the PAR context. If you want to convert an existing function, create a wrapper of the entire action diagram logic. See the chapter Creating Wrappers to Reuse Business Logic.

Duplicate Parameter Contexts

43

Chapter

Batch Processing Enhancements


COOL:2E has long been recognized as providing excellent functionality for screen-based interactive programming. However, much of the COOL:2E code is necessary only for interactive processing and is unnecessary but still processed for a program that runs only in batch. Therefore, batch programs may be slower than similar hand-coded programs. In addition, the amount of database I/O is high for all COOL:2E programs. This is due, in part, to the database integrity checking that occurs during a typical interactive program. For batch programs, much of this integrity checking is unnecessary if the application developer takes full responsibility for good batch programming. For example, if a customer can ensure that only one program at a time will access a particular file, then the program does not need to check for the continued existence of a record on that file while the record is being processed. COOL:2E version 7.0 provides the following new features for batch programs:
I I

A new internal field called *Relative record number. The following internal database functions can be created over physical (PHY) access paths: Retrieve object (RTVOBJ), Change object (CHGOBJ), Delete object (DLTOBJ), and Create object (CRTOBJ).

Important! Because of the way this batch processing feature works, it is available only when the COOL:2E model is defined with a DDS database. If you are using an SQL database with your COOL:2E model, do not use this feature.

Batch Processing Enhancements

51

*Relative record number Field

*Relative record number Field


The new *Relative record number field is a 9.0 numeric field with the internal name RRN. When a program uses a physical file, a relative record number (RRN) field is assigned to that file. The *Relative record number field can be a key to access a specific record in that file, regardless of the contents of each field in that record. A different RRN field is assigned to each physical file that a program uses. In the CHGOBJ, CRTOBJ, and DLTOBJ internal database functions built over a PHY access path, the RRN is available in the DB1 context and can be manipulated to retrieve or update a specific record.

Internal Database Functions and PHY Access Paths


This section describes what happens when the following internal database functions are created over physical (PHY) access paths: Retrieve object (RTVOBJ), Change object (CHGOBJ), Delete object (DLTOBJ), and Create object (CRTOBJ).

Retrieve object (RTVOBJ)


A RTVOBJ created over a PHY access path has one *Relative record number (RRN) parameter by default: Parameters *Relative record number Any other fields Usage I Any Role (default) RST/POS (POS) none Default Y none

This *Relative record number parameter can be used as a key to the physical file as follows: RRN as a Restrictor Parameter (I, B, or N) to a PHY RTVOBJIf the RRN for a RTVOBJ function built over a PHY access path is a Restrictor parameter, only the record with RRN equal to the parameter value is read. RRN as a Positioner Parameter (I, B, or N) to a PHY RTVOBJIf the RRN for a RTVOBJ function built over a PHY access path is a Positioner parameter, only records with RRN greater than or equal to the parameter value are read.

52

COOL:2E Release Summary

Internal Database Functions and PHY Access Paths

RRN as an Output Parameter from a PHY RTVOBJIf the RRN for a RTVOBJ function built over a PHY access path is an Output parameter, all records in the access path are read, starting with record 1. The RRN of the last record read from the file is passed as the parameter value. RRN as a Neither Parameter to a PHY RTVOBJIf the RRN for a RTVOBJ function built over a PHY access path is a Neither parameter, the RRN first used to access the file is the current value of the Neither parameter. The Neither parameter is accessible from the RTVOBJ in the PAR context. Although the parameter is initialized to 1 in the RTVOBJ, it can be changed to any numeric value in the User Exit Point USER: Initialize routine. The value following that User Exit Point is used to access the file initially. Deleting the RRN Parameter to a PHY RTVOBJIf the default RRN parameter is deleted, two outcomes are possible:
I

If USER: Process data record User Point contains user logic, all records in the access path starting with record 1 are read. If USER: Process data record User Point does not contain user logic, only record 1 is read.

Note: You can add other parameters besides RRN to PHY RTVOBJ functions, but RRN must be passed first. Here is a quick reference table with information about processing the parameter *Relative record number: Initialized in RTVOBJ? No No No No Neither PAR Neither PAR 1 1 Record Processing Single Single or multiple* Single Single or multiple* Single Single or multiple* Single or multiple* Single or multiple* Value Returned None None RRN of last record read RRN of last record read None None RRN of last record read None

Usage I I B B N N O Not used

Role RST POS RST POS RST POS n/a n/a

* Depends on processing in the USER: Process data record User Exit Point.

Batch Processing Enhancements

53

Internal Database Functions and PHY Access Paths

Change object (CHGOBJ)


In a normal CHGOBJ, the processing includes these steps: 1. 2. 3. 4. 5. 6. 7. 8. 9. USER: Processing before data read. Load key fields to record format. Access file to check if record exists. USER: Processing if data record not found. If record not found, send error message and quit. If record locked, send error message and quit. USER: Processing after data read. Load non-key fields to record format. USER: Processing before data update.

10. Update record. 11. If update failed, send error message and quit. 12. USER: Processing after data update. In a CHGOBJ built over a PHY access path, the processing includes these steps: 1. 2. 3. 4. 5. Load key and non-key fields to record format. USER: Processing before data update. Update record. If update failed, send error message and quit. USER: Processing after data update.

Notes:
I

The pre-update file access is not generated. This is normally generated as an RPG CHAIN or as a COBOL READ statement. Any action diagram code in the following User Points is ignored, and no code is generated for them: USER: Processing before data read USER: Processing if data record not found USER: Processing after data read

A CHGOBJ created over a PHY access path can be attached only to a RTVOBJ built over the same PHY access path. This is because of the OS/400 requirement that a record to be changed must have been read previously.

54

COOL:2E Release Summary

Internal Database Functions and PHY Access Paths

Delete object (DLTOBJ)


In a normal DLTOBJ, the processing includes these steps: 1. 2. 3. 4. 5. 6. 7. USER: Processing before data update. Access file to check if record still exists. If record already deleted, send error message and quit. If record locked, send error message and quit. Delete record. If delete failed, send error message and quit. USER: Processing after data update.

In a DLTOBJ built over a PHY access path, the processing includes these steps: 1. 2. 3. 4. USER: Processing before data update. Delete record. If delete failed, send error message and quit. USER: Processing after data update.

Notes:
I

A DLTOBJ created over a PHY access path is created with no parameters. You must ensure that the record to be deleted was read in a RTVOBJ built over the same PHY access path. Thus, the DLTOBJ should be inserted only in the USER: Process data record User Exit Point in the RTVOBJ. The pre-delete file access is removed. This is normally generated as an RPG CHAIN or as a COBOL READ statement. Any code in the USER: Processing if data record already exists User Point is ignored. A DLTOBJ built over a PHY access path can be attached only to a RTVOBJ built over the same PHY access path.

Batch Processing Enhancements

55

Internal Database Functions and PHY Access Paths

Create object (CRTOBJ)


In a normal CRTOBJ, the processing includes these steps: 1. 2. 3. 4. 5. 6. 7. 8. 9. Load parameters to record format. USER: Processing before data update. Access file to check if record already exists. USER: Processing if data record already exists. If record already exists, send error message and quit. Write record. USER: Processing if data update error. If write failed, send error message and quit. USER: Processing after data update

In a CRTOBJ built over a PHY access path, the processing includes these steps: 1. 2. 3. 4. 5. 6. Load parameters to record format. USER: Processing before data update. Write record. USER: Processing if data update error. If write failed, send error message and quit. USER: Processing after data update.

Notes:
I I

The pre-create file access is removed. Any code in the USER: Processing if data record already exists User Point is ignored. A CRTOBJ built over a PHY access path cannot be used in any function that also contains a RTVOBJ built over the same PHY access path. This is because the file definition requirements of a PHY access path used for CRTOBJ are different from those used for CHGOBJ, DLTOBJ, or RTVOBJ. However, the Action Diagram Editor registers an error only if you attempt to attach the CRTOBJ to a RTVOBJ directly. If you attach a CRTOBJ to, for example, an EXCEXTFUN that also contains a PHY RTVOBJ, the Editor does not register an error, but the function compilation will fail.

56

COOL:2E Release Summary

Internal Database Functions and PHY Access Paths

Using Functions Built Over PHY Access Paths


This is a quick reference table with information about functions built over PHY access paths: Database Function Retrieve object Retrieve object Change object Change object Delete object Delete object Create object Create object Create object Allowed by Compiler? No Yes Yes No Yes No No No Yes Action Diagram Editor Error? Yes n/a n/a Yes n/a Yes Yes No n/a

Attaching to: CRTOBJ over same PHY access path Other function RTVOBJ over same PHY access path Other function RTVOBJ Other function RTVOBJ over same PHY access path Other function containing RTVOBJ Other function

Consider the following points when using functions built over PHY access paths:
I

Because some error checking has been removed from these functions, the application designer must ensure that applications using these functions do not run at the same time as other functions that use these files. Otherwise, locks may be placed on records that these functions need to read. CHGOBJ and DLTOBJ functions built over a PHY access path can be used only in a RTVOBJ built over the same PHY access path. This ensures that the record to be changed or deleted has just been read in the RTVOBJ. A CRTOBJ function built over a PHY access path can be used only in a function that does not contain a RTVOBJ, CHGOBJ, or DLTOBJ built over the same PHY access path. We suggest that you create an Execute external function (EXCEXTFUN) with the same parameters as the CRTOBJ, include only the CRTOBJ in that function, and access the PHY CRTOBJ by using that function. Although the generators create code differently for the RTVOBJ, CHGOBJ, DLTOBJ, and CRTOBJ functions, the action diagram for each function does not change. This may cause confusion, because User Points are visible in the action diagram and statements can be entered in them, but those User Points may not be generated.

Batch Processing Enhancements

57

Chapter

Object Locking Enhancements


The enhancements to object locking increase security and let you add a description to a lock.

Locking an Object
You can lock an object in the following two ways:
I

Automatic object lockingThe model adds this lock when you enter a function or start to edit an object. This temporary lock prevents another person from using the object. The lock is removed when you finish editing the object. Explicit object lockingWhen you enter a model as either *PGMR or *DSNR, you can add a permanent lock to an object by typing L against the object. While this lock is in place, it prevents other users from changing the object.

Object Locking Enhancements

61

Object Locking Window

Object Locking Window


In version 7.0 of COOL:2E, the following new attributes are available on the window that appears when you lock an object:
I

Lock levelThe model now stores the level of the lock: *DSNR and *PGMR (the default). These lock levels have the following meaning: *DSNR lets you add or remove both *DSNR and *PGMR locks. *PGMR lets you add or remove only *PGMR locks.

In previous versions of COOL:2E, a *PGMR type of lock was the only kind available. Anyone could remove a lock and change the object or add new objects. The *DSNR level increases security.
I

Lock reasonThis is a 50-character text field in which you can enter the reason for the lock. If the field is left empty, the job details are placed in the field. In previous versions of COOL:2E, it was not possible to see who added a lock or why it was added.

Example

The following scenario shows how the two lock levels can help prevent accidental changes to an object: A team of junior programmers is working in a model that contains some existing functions. As internal database functions like RTVOBJ or CHGOBJ are completed, the project leader can add *DSNR locks to them to ensure that junior programmers cannot change them. As external functions are completed, the project leader can add *PGMR locks to them, ensuring that junior programmers cannot change them unless they explicitly remove the lock.

62

COOL:2E Release Summary

Chapter

Other Enhancements to COOL:2E


This chapter describes additional enhancements in version 7.0 of COOL:2E:
I I I I

New program status fields in JOB context *Job century added to JOB context New parameter selection options X, D, and N *NLL default parameter context added to YDFTCTX model value

New Program Status Fields in JOB Context


The internal system *Job Data file has several new fields that are available in the JOB context. These fields relate directly to fields in the Y2PGDSP and Y2PGDSPK files, which hold information about the program currently being run. These two files are based on the IBM Program Status Data Structure (PSDS), for which COOL:2E generates code by default in RPG, RPGIV and COBOL programs. For an explanation of these fields, see IBM manuals. The new fields are: DDS Name STS PST RVN PRM MSI PLB MSD EFL EFS PSDS Position (Length) PSDS Field name 11 - 15 (5,0) 16 - 20 (5,0) 29 - 36 (8) 37 - 39 (3,0) 40 - 46 (7) 81 - 90 (10) 91 - 170 (80) 201 - 208 (8) 209 - 243 (35) *STATUS Previous *STATUS *ROUTINE *PARMS Exception msgid Program library Retrieved exception data Name of file in error Status info of last file used

Textual (Model) Name *Pgm STATUS *Pgm Previous *STATUS *Pgm *ROUTINE *Pgm *PARMS1 *Pgm Exception msgid *Pgm Program library *Pgm Exception data *Pgm File in error *Pgm Last file status

Other Enhancements to COOL:2E

71

*Job century Field Added to JOB Context

1The

*Pgm *PARMS field also has a single condition attached to it: Type CMP Op EQ File Value -1

Condition *Unknown

To add these fields to the model, it was necessary to change the names of the fields in the Y2PGDSP and Y2PGDSPK files to match them, as follows: Y2PGDSP: Old DDS Name ##STCD ##STCP ##RTVN ##PMCT ##MSID ##PGLB ##MSDA ##ERFL ##ERST New DDS Name ##STS ##PST ##RVN ##PRM ##MSI ##PLB ##MSD ##EFL ##EFS Y2PGDSPK: Old DDS Name ZZSTCD ZZSTCP ZZRTVN ZZPMCT ZZMSID ZZPGLB ZZMSDA ZZERFL ZZERST New DDS Name ZZSTS ZZPST ZZRVN ZZPRM ZZMSI ZZPLB ZZMSD ZZEFL ZZEFS Textual name *STATUS Previous *STATUS *ROUTINE *PARMS Exception msgid Program library Retrieved exception data Name of file in error Status info of last file used

*Job century Field Added to JOB Context


The *Job Data file now has the *Job century field, which makes the field available in the JOB context. The field has the internal DDS name JCC, which matches the value held in the Y2PGDSP and Y2PGDSPK program status data structure files.

72

COOL:2E Release Summary

New Parameter Selection Options D, N, and X

New Parameter Selection Options D, N, and X


The Edit Function Parameters panel has several new subfile select options: D, N, and X. These options are in addition to the current Z option, which displays the Edit Function Parameter Details panel.
D (Delete)

The new D option blanks out the subfile line. It is included for consistency throughout the product. The new N option is available only for a function with duplicate parameters. For details about the use of option N, see the chapter Duplicate Parameter Contexts. The new X option displays details about the object being used as a parameter. If the object is a single field (*FIELD field-name), option X displays the Edit Field Details panel. If the object is an access path, option X displays the Edit Access Path Details panel. If the object is an array, option X displays the Edit Array Details panel. You can add new fields to an access path or array, and those fields will be available for use as parameters when you return to the Edit Function Parameters panel. This eliminates the need to leave function parameter editing in order to change access path or array details.

N (Narrative)

X (Object Details)

*NLL Default Parameter Context Added to YDFTCTX Model Value


The model value YDFTCTX now allows *NLL as a value, in addition to the currently allowed values of *WRK and *LCL. When *NLL is selected, any output parameters from a function use NLL as the default context if the parameters are undefined and you press F10 from the Edit Action - Parameter Details window in the Action Diagram Editor. Any parameters with a usage of Input or Both use the same defaults as when YDFTCTX is set to *LCL.

Other Enhancements to COOL:2E

73

Chapter

Enhancements to COOL:Xtras 400 Toolkit


This chapter explains the following new features in version 7.0 of the COOL:Xtras 400 Toolkit:
I I

Convert Spooled File (YCVTSPLF) command Execute Batch FTP Session (YEXCFTP) command

Convert Spooled File (YCVTSPLF)


The Convert Spooled File (YCVTSPLF) command lets you convert an AS/400 spooled file to a PC file. You can then send the file by e-mail or other PC filetransfer methods and manipulate the file by PC software. The YCVTSPLF command is a stand-alone command in version 7.0 of the COOL:Xtras 400 Toolkit. When more than one spooled file with the same name exists for the specified job, an interactive window appears so that you can select a spooled file. If duplicate jobs contain the specified spooled file, an error message is sent.

Convert AS/400 spooled file (YCVTSPLF) Spooled file name . . . . . Name Job name . . . . . . . . . . * Name, *, *USER,* FILE User . . . . . . . . . . . Name Number . . . . . . . . . . 000000-999999 Spooled file number . . . . *ONLY 1-9999, *ONLY, *LAST Conversion options . . . . . *USER File conversion options PC file name . . . . . . . . *FILE Name, *FILE PC file type . . . . . . . . *HTML Character value, *HTML, *TEXT PC file title . . . . . . . *FILE Format options . . . . . . . *NONE *DLTLINE1-9, *MARKLINE... Format option text . . . . . *ALL Replace existing PC file . . *YES *YES, *NO Delete spooled file . . . . *NO *NO, *YES Conversion table . . . . . . *NONE Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys

Enhancements to COOL:Xtras 400 Toolkit

81

Convert Spooled File (YCVTSPLF)

Parameters
The YCVTSPLF command has the following parameters: FILE JOB Spooled file nameThis parameter is the name of the spooled file to be converted. This is the only required parameter. Job name/User/NumberThis parameter indicates the details of the job that produced the spooled file. This three-part parameter accepts the standard values associated with the equivalent parameter in an IBM spooled file command like DSPSPLF. It also accepts the following single values:
I

*USERThis value searches for the specified spooled file in any job run by the user executing the YCVTSPLF command. *FILEThis value searches for a spooled file produced by a job with the same name as the spooled file. An example is a compilation listing. *USRJOBThis value searches for a spooled file produced by a job with the same name as the spooled file and that was run by the user executing the YCVTSPLF command.

SPLNBR CVTOPT

Spooled file numberThis parameter behaves the same way as the equivalent parameter in an IBM spooled file command like DSPSPLF. Conversion optionsThis parameter specifies the options to use when converting the spooled file. The value entered here is used as a key to access the YCVTSPP file. The values for PATH, BACKGROUND, HEADER, and FOOTER (explained following) are stored in the shipped file YCVTSPP in the library Y1SY. The file YCVTSPP is keyed by user profile ID. This file ships with a record for *USER that has default values pre-assigned to it. You can customize this file to assign parameter values for the user profiles on your system. For example, each user could have their own PATH (folder) for their converted spool files. Use YWRKF or your favorite editing utility to edit the YCVTSPP file. Add records with key field USER equal to the user profiles on your system. You must create the folders assigned to the PATH parameter; including the default folder YSPLF for *USER. When the CVTOPT parameter is set to *USER, the command searches for a record in YCVTSPP with a matching record for the user profile executing the command. If a match is not found in the file, the default settings for the shipped record *USER are used.

82

COOL:2E Release Summary

Convert Spooled File (YCVTSPLF)

The matching record contains the following details:


I

PATHThe name of the directory to which the converted spooled file should be copied. You must create the folder CRTFLR before executing this command. The default profile of *USER that is shipped in the YCVTSPP file uses a default PATH variable of /QDLS/YSPLF/. To convert spooled files, you must use the following command to create the YSPLF folder on the AS/400:
CRTFLR FLR(YSPLF) TEXT('Default YCVTSPLF folder for *USER)

BACKGROUNDThe background to be used if the spooled file is converted to an HTML file, for example, C:\WINDOWS\IMAGES\BACKGRND.GIF. If this field is empty, no background is specified in the HTML file. If the specified file cannot be found when the HTML file is displayed, no background is displayed. HEADERThe header to be used if the spooled file is converted to an HTML file, for example:
<hr><b><i>Title: </b>Converted spooled file created by <a href=http://support.ca.com>Customer Support</a></i><hr>

You can use any HTML statements. In the converted HTML file, these statements are located immediately before the information in the spooled file. If no header is specified, none is used.
I

FOOTERThe footer to be used if the spooled file is converted to an HTML file, for example:
<hr> 2000 <a href=http://www.ca.com> Computer Associates International, Inc.</a><hr>

You can use any HTML statements. In the converted HTML file, these statements are located immediately after the information in the spooled file. If no footer is specified, none is used. TOFILE PC file nameThis parameter is the name given to the PC file. Because this command uses the AS/400 folder system to convert the spooled files, the name can be only eight characters to allow for a maximum of 12 characters, including the three-character PC extension. A default value of *FILE means that the name of the spooled file will be used (or the first 8 characters of it, if it is more than 8 characters long). PC file typeThis parameter is the type of the PC file. The default value of *HTML creates a Hypertext Markup Language file (.htm). The other allowed value is *TEXT, which creates a text file (.txt). Three-character values are allowed, preceded by a period. Examples are .rtf, .log, and so on. PC file titleThis parameter is the title of the PC file if it is converted to an HTML file. This value appears in the title bar of a browser window. A default value of *FILE is the same as specifying no title; in this case the title is the PC file name.

TYPE

TITLE

Enhancements to COOL:Xtras 400 Toolkit

83

Convert Spooled File (YCVTSPLF)

FMTOPT/OPTTXT

Format options/Format option textThese parameters indicate the formatting options for the different file types and the text to which they apply. The default for FMTOPT is *NONE. The default for OPTTXT is *ALL, which means that the selected format options apply to all the text in the spooled file. The options are:
I

*DLTLINE1-9The number of lines to be deleted from the converted spooled file, starting with the line containing the text selected in the OPTTXT parameter. This can be useful for removing page header lines. *INDLINEAny line containing the selected text is indented three spaces. *MARKLINEAny line containing the selected text has ==> in the first three spaces. *HIGHLIGHT (HTML files only)Any text selected in the OPTTXT parameter is highlighted and bold when the HTML file is displayed. *ITALIC (HTML files only)Any text selected in the OPTTXT parameter is italic when the HTML file is displayed. *UNDERLINE (HTML files only)Any text selected in the OPTTXT parameter is underlined when the HTML file is displayed.

I I

RPLPCFILE

Replace PC fileThis parameter is a Yes/No flag indicating whether the converted spooled file should replace an existing file in the same folder with the same name. The default is *YES. Delete spooled fileThis parameter is a Yes/No flag indicating whether the spooled file should be deleted after it is converted. The default is *NO. Conversion tableThis parameter is the path name of the conversion table used to convert data from the spooled file to the PC file.

DLTSPLF TBL

84

COOL:2E Release Summary

Convert Spooled File (YCVTSPLF)

Example
Here is an example record in YCVTSPP for user RMH showing path, background, header, and footer:
YPDDKSI

Work with File - Single record Display File. . . . : YSYS/YCVTSPPSYS/YCVTSPP Member . : YCVTSPP Format : Name Roll value. : 14 Heading Length Value User Path Background Header 10 50 50 200 RMH /QDLS/YSPLF/

YCVTSPR UPDATE

Footer

200

C:\I386\INETSRV\HTML\SAMPLES\IMA GES\BACKGRND.GIF <hr><b><i>Title:</b>*TITLE.</i> This file was created by <a href= http://support.ca.com>Customer Support</a></hr> <hr> Copyright 2000 <a href= http://www.ca.com> Computer Associates International, Inc.</a></hr>

Enhancements to COOL:Xtras 400 Toolkit

85

Convert Spooled File (YCVTSPLF)

Here is the spooled file as it appears on the AS/400:

86

COOL:2E Release Summary

Convert Spooled File (YCVTSPLF)

This is the same spooled file after conversion by YCVTSPLF with the YCVTSPP values just shown:

Enhancements to COOL:Xtras 400 Toolkit

87

Execute Batch FTP Session (YEXCFTP)

Execute Batch FTP Session (YEXCFTP)


This command-based tool allows the easy use and reuse of prewritten File Transfer Protocol (FTP) sessions. This tool enables the transfer of data and objects between AS/400 systems or between an AS/400 system and any FTP server, such as an Internet FTP site or a networked FTP server. A common use for FTP in the AS/400 environment is the transfer of objects by saving them to files and transferring the files. The most common way to start an FTP session is with the IBM Start TCP/IP File Transfer Protocol command STRTCPFTP. A command line-like session begins where you can: enter FTP commands to save the objects to a save file using a CL interpreter; open a session with a remote device; log on to that device with a user ID and password; define the session and file transfer attributes; and transfer the file. The previous scenario is completely interactive. If the save file is large, or if the link to the remote system is slow, the FTP session can lock up a keyboard and screen for a considerable amount of time. Therefore, some sites use predefined FTP scripts. These scripts can be source members, and at the beginning of an FTP session a user can run the script rather than start an interactive FTP session. The script can contain any FTP commands except ones that require interactive input (such as help). While FTP scripts can be useful, they require some technical understanding and may not be as easy to use as the command interface because the user must perform some file overrides before executing STRTCPFTP.

88

COOL:2E Release Summary

Execute Batch FTP Session (YEXCFTP)

The YEXCFTP command enables users with little technical knowledge of FTP and TCP/IP to create, use, and store predefined FTP scripts. All FTP scripts used by YEXCFTP are defined as members within the YSCRIPT source file. A copy of YSCRIPT is supplied in the library Y1SY, and it can be copied to other libraries. New members (scripts) can be added to the YSCRIPT file and used by anyone with authority to the YSCRIPT file. Because FTP requires a valid user ID and password on a remote system, YEXCFTP provides two options for handling passwords. You can put the user ID and password in the script (perhaps where a generic user ID and password are to be used, or where security is not an issue) or enter a user ID and password when the command is run.
Execute Batch FTP Session (YEXCFTP) Type choices, press Enter. Remote system . . . . . . . . . > *INTNETADR Internet address . . . . . . . . > 123.456.789.001 Script name . . . . . . . . . . > Library . . . . . . . . . . .> Edit script . . . . . . . . . . > FTP session log . . . . . . . . Display FTP session log . . . . User ID on remote system: User Profile . . . . . . . . . User password . . . . . . . . FTP1 Y1SY *NO *JOB *NO Name, *SELECT, *S Name, *LIBL, *CURLIB *YES, *NO Name, *JOB, *NONE *NO, *YES, *ERROR,

The YEXCFTP command can be run interactively or in batch. If it is run interactively, a keyboard may still be locked up while the FTP statements in the script are being executed. Creating FTP scripts requires some knowledge of FTP commands. Once created, however, the scripts can be executed repeatedly by people who know nothing about FTP commands. The following sample script saves a library (LIBX) from the local system and transfers it to an FTP server web site. On that web site, the user ID is Bunny and the password is Cottontail. The library is transferred to the directory Transfers/Uploads/Products.
Bunny Cottontail ! CRTSAVF FILE(QTEMP/LIBXSAVE) TEXT('LIBX saved') ! SAVLIB LIB(LIBX) DEV(*SAVF) SAVF(QTEMP/LIBXSAVE) binary cd Transfers/Uploads/Products namefmt 1 quote site namefmt 1 put qsys.lib/qtemp.lib/libxsave.savf close quit

Enhancements to COOL:Xtras 400 Toolkit

89

Appendix

Fix Notes
This Appendix lists the bugs that have been fixed since version 6.2 of COOL:2E. Included are:
I I

New fixes from issues raised during RC1 testing Fixes contained on the various PTF tapes

New Fixes in Version 7.0


The fixes in this section are from issues raised by developers and customers during RC1 testing. None of these issues have been on a PTF tape. The fixes are identified by an issue number and a four-digit code in parentheses.
Issue Problem

10147448 (1133) EXCUSRSRC substitution variable *TYPE generates *RPG for source type RPG and RP4. For source type RPG *TYPE now generates *RPG, and for source type RP4 it generates *RP4.

Resolution

Issue Problem

10147319 (1132) RPGIV Print File fails at runtime when the page overflows, with I/O error CPF5004 was detected in file... The generated RPGIV does not specify the overflow indicator OFLIND(*INxx), where xx is the overflow indicator. The OFLIND keyword is now generated with the correct parameter.

Resolution

Fix Notes

A1

New Fixes in Version 7.0

Issue Problem

10147368 (1131) EDTFIL RPGIII and RPGIV with ALWRCDCHG function option set to N does not compile. This problem has now been fixed.

Resolution

Issue Problem

10147116 (1130) CM cannot handle a request to promote a program of type RP4. This occurs because CM cannot tell if the object has been compiled as type *MODULE or *PGM. YEXCMDLLST now has a new substitution variable @Y4. For an object of type FUN it returns MOD or PGM. If the object is not of type FUN it returns blank (' '). Note that a change is still required in CM to handle the adapted command.

Resolution

Issue Problem

10147226 (1129) When RP4 function submits a job using the SUBJOB feature, this error appears: RNF0267 Character literal has missing trailing apostrophe. This occurs when the SUBMIT job overrides create RPGIV source that continues over more than one line. This fix allows a multiple line constant for the SBMJOB overrides.

Resolution

Issue Problem

10147180 (1128) SBMJOB overrides default to MDLVAL, which is dangerous because everyone will use the same overrides. This fix makes the default override to L = local. Note that this is a new implementation of fix 1117, which did not function properly at 7.0 RC1.

Resolution

A2

COOL:2E Release Summary

New Fixes in Version 7.0

Issue Problem

10147264 (1127) Model Value YRP4SGN (RPGIV Generation options) cannot be displayed with YDSPMDLVAL. It causes the CPD0084 error YRP4SGN not valid for parameter MDLVAL. This model value can now be properly displayed using YDSPMDLVAL. The value is displayed in the Display Function generation values - Program and Device section. YCHGMDLVAL is not compatible with YRP4SGN.

Resolution

Issue Problem Resolution

10147017 (1126) COBOL function with refers to fails with run unit end at 1909 in YCHKRELK2I. This problem has now been fixed.

Issue Problem

10139473 (1125) EDTRCD 1, 2, or 3 with refers to relation OPTIONAL do not highlight the field in error. The message is sent to the screen but the cursor is not positioned and the field is not highlighted. This problem has now been fixed.

Resolution

Issue Problem Resolution

10146516/10139473 (1124) COBOL function with refers to fails with run unit end at 1908 in YCHKRELK2I. This problem has now been fixed.

Issue Problem

10511684 (1123) YDOCMDLFUN issues rue 1243 in YMSGDTAL1I. It is a problem only if the action diagram statement change date is greater than the PRTCHGDAT parameter on YDOCMDLFUN and action diagram statement date is greater than 31/12/99. This problem has now been fixed.

Resolution

Fix Notes

A3

New Fixes in Version 7.0

Issue Problem

10139473 (1122) Sometimes when a relation is defined as optional in an edit record and the function is generated in COBOL, the cursor is not positioned correctly on a field in error. This problem has now been fixed.

Resolution

Issue Problem

10140285 (1121) When a call is made to a function in the action diagram, and the parameters include *ARRAY passed as RCD, and the function is submitted to batch, the function does not generate. The generation now completes normally.

Resolution

Issue Problem

10078451 (1118) Cannot distinguish some DBCS characters in field condition values when the field does not allow lower case. If a field is set to allow lowercase in the Edit Field Details panel, then the condition value is always converted to uppercase. This causes problems for some DBCS characters. This fix suppresses the change if the model is set up for IGC conversion (YIGCCNVRFA = 1).

Resolution

Issue Problem

No issue number assigned (1117) SBMJOB overrides default to MDLVAL, which is dangerous because everyone will use the same overrides. Now overrides default to L = local.

Resolution

Issue Problem

10141402 (1116) Compile fails with invalid Operation Entry Invalid. Fields with conditions with lengths over 20 can be incorrectly updated, via Edit Field Details panel with ++ as the operator. This causes errors at generation time, and the generation ends abnormally. This fix corrects these problems.

Resolution

A4

COOL:2E Release Summary

New Fixes in Version 7.0

Issue Problem

10084429 (1115) If a call is made to a function and the user does not FF on the call to default parameters, and generation is in COBOL, then the generation ends abnormally. This fix allows correct generation.

Resolution

Issue Problem

10087462 (1113) *SUBSTRING in RPG generation returns incorrect result for DBCS input string. If the input string to *SUBSTRING is DBCS, then the result returned is everything to the right of the FROM POSITION. It is as if the FOR LENGTH parameter were *END or *FLDLEN, regardless of whether a constant value was entered. The code now returns the correct data.

Resolution

Issue Problem

10137328 (1112) DUS is not attaching to the correct point. In version 6.2 when DUS is added, a device source extent stamp becomes the beginning of the extent, immediately preceding the comment line and definition of a field. Therefore, when DUS is added between the extent stamp and the field definition, it would pertain to (act on) a preceding field. This fix ensures that DUS is attached after the field definition line, so as to act on the field it is attached to. This occurs unless FIND or POSITION is the first command before a line of DUS has been found; in this case the command starts from the current line, which is the line immediately after the extent stamp.

Resolution

Issue Problem

10139433 (1111) After a CHGJOB, Y2RTJCR is not updating the *Job date and *Job start date because it uses UDATE, which comes from the same source as *Job submitted/start date. Y2RTJCR has been changed to pass the correct dates back to the calling program.

Resolution

Fix Notes

A5

New Fixes in Version 7.0

Issue Problem

10139465 (1110) Version 6.2 did not allow *Job date to move to UDDT. A change to add D8# date field meant that code to *MOVE *Job date to user-defined data-type (UDDT) fields failed in 6.2, when it previously worked at 6.0. This has been changed on a general basis, so that a *MOVE to any UDDT is allowed. A warning message appears, noting that the user should use *CVTVAR if a possibility of run-time decimal data errors exists.

Resolution

Issue Problem

10139179 (1109) Substitution variables in EXCUSRSRC are not working correctly. If more than one substitution variable (#*FILE, #*MBR and so on) is placed in a single source line in a piece of EXCUSRSRC, the replacement process incorrectly calculates the start position in order to replace it with the actual value. This has been fixed.

Resolution

Issue Problem

10138436 (1108) A SELRCD created using a partial key is showing all the primary keys as parameters when accessed from another function. In addition, they are using the primary keys of the default RTV access path as parameters, rather than the primary keys of the access path over which they were built. This has been fixed.

Resolution

Issue Problem

10139187 (1107) The Display Functions panel called from Action Diagram Services does not list functions that contain DBCS characters. This has been fixed.

Resolution

Issue Problem

10138181/10139182 (1106) When DBCS data is entered in the Field Name Contains Selection field of the Edit Function Parameter Details panel, parameters are not filtered correctly. This has been fixed.

Resolution

A6

COOL:2E Release Summary

New Fixes in Version 7.0

Issue Problem

10138282/10138293 (1105) Scanning for a function or field using Action Diagram Services in a Japanese model fails to find some functions and fields even if they exist in the target function being searched. This has been fixed.

Resolution

Issue Problem Resolution

10138285 (1104) YCHKFUNACT frees storage that was not previously allocated. This fix ensures that only allocated storage is freed.

Issue Problem

10138294 (1103) When performing a scan, Action Diagram Services does not strip out shift-in and shift-out characters at the start and the end. Thus, existing strings are not found. Shift-in characters at the start of a string to be searched for are now correctly stripped out, and shift-out characters at the end of a string are stripped out.

Resolution

Issue Problem

10137328 (1102) Attaching DUS to a field generates the DUS at the beginning of the field extent. The result is DSES stamp, then DUS, then field comment line, and then field DDS definition. Thus, the DUS pertains to the previous field rather than the field with the DUS attached to it. This fix causes DUS (for fields only) to be generated in the extent. The result is DSES stamp, then field comment line, then field DDS definition, and then DUS.

Resolution

Issue Problem

10137793 (1101) Attaching DUS to the Detail Line format in a PRTFIL also attaches the DUS to the Column Heading format. This fix ensures that DUS is attached only at the beginning of the Detail Line format extent.

Resolution

Fix Notes

A7

New Fixes in Version 7.0

Issue Problem

10090412 (1100) Copying a *MOVE construct to *MOVE ALL in the Action Diagram Editor and then altering the parameters causes incorrect code to be generated in some circumstances. This problem has now been fixed.

Resolution

Issue Problem

10088970 (1099) The wrong version of Y2RTJBR was shipped at 6.2 GA and therefore is contained in 7.0. COBOL programs running with the wrong version can cause database corruption because Y2RTJBR does not return the correct values to the calling program. A copy of the 6.1 release Y2RTJBR is contained in the 7.0 GA product.

Resolution

Issue Problem

10888916 (1098) MSF file generation contains corrupt characters at the beginning of message text descriptions if the OS/400 PTF for the QMHRTVM API offset returned error has been applied. The QMHRTVM API sets the offsets in the RTVM0300 format to a value that is one greater than the correct value. QMHRTVM becomes: R320 SF51812 R360 SF51814 R370 SF51813 R410 SF51815 R414 SF51816 R420 SF51815 R430 BASE R440 BASE The QMHRTVM API returns message information structure that contains incorrect offsets when format RTVM0300 is specified. The values of the offsets are 1 greater than they should be. The offsets affected are Offset of default reply, Offset of message, Offset of message help, and Offset of substitution variable formats.

Resolution

This problem has been corrected.

A8

COOL:2E Release Summary

Issue Problem

10078435/*08268 (1097) If an EXCUSRPGM is on the YSBMMDLCRT job list, entering a G against it rather than a C causes an abnormal end to the YGENSRC job, and the source for the EXCUSRPGM is deleted if it is in the model GEN library. A G against an EXCUSRPGM is now ignored.

Resolution

Issue Problem Resolution

10147631 (no code assigned) Problem with YCHKMDLCRT. YCHKMDLCRT now has an extra parameter at the end of SRCLIB. It is a 10character parameter with the same defaults and special value processing as the OBJLIB parameter. When YCHKMDLCRT is checking the compilation of an RPGIV program, it looks in the *GENLIB for the source. If the source parameter is different from the value of *GENLIB, it looks in the SRCLIB library.

Fix Notes

A9

Fixes on PTF Tapes

Fixes on PTF Tapes


The bug fixes in this section were included on PTF tapes sent to customers. The most recent PTF tapes are listed first. All tapes were cumulative; that is, they contained all fixes since the release of version 6.2 of COOL:2E. Only the new fixes for each successive PTF are listed here. A few of these fixes were addressed during the RC1 testing period. They are identified by an issue number and a four-digit code in parentheses, for example, 10142324/10142325 (1120).

62070
The PTF tape 62070 contained the following new fixes and all previous fixes since 6.2.
Issue Problem

10142324/10142325 (1120) When option 14 is taken from the Display Model Usages panel or the Edit Model Object List panel, the compile request is not reflected in the current job list. The YCRTJOBLE command used here defaults to JOBLST(*MDLPRF). This has been changed to the Job List name being used in the model editing session.

Resolution

Issue Problem

10142167 When YWRKF accesses a physical file, the Position field is only 7 characters long, and is unable to position to an RRN greater than 9,999,999. The Position field was changed to 9 characters.

Resolution

Issue Problem

10143343/10139298 Problems with Toolkit User Profile expiring with option *PMTCHG with grace period extending over 1/1/2000 and problems with expiration dates in 2000. Resolved.

Resolution

A10

COOL:2E Release Summary

Fixes on PTF Tapes

Issue Problem

10139869 (COBOL only) (1119) EDTRCD2 and EDTRCD3 are not updating the Changed Status field on screen 1 when ENTER is pressed after prompting of Status field on screen 2. Resolved.

Resolution

62060
The PTF tape 62060 contained the following new fixes and all previous fixes since 6.2.
Issue Problem

10140955/10138147 (Affects DBCS users only) CTL format selection fields for DSPFIL and SELRCD are not selecting correctly when DBCS characters are entered. Processing changed to strip out shift-in and shift-out characters before search.

Resolution

Issue Problem

10140739 Default *MOVE of screen fields to database fields inadvertently removed for RPG in CRTOBJ and CHGOBJ in 62050 Issue 10138436. Processing changed back to allow defaulting without the need to revisit the action diagram after a change to access path.

Resolution

Issue Problem Resolution

10139181/10139182 (Affects DBCS users only) (1114) Function Parameter Selection not working with DBCS characters. Processing changed to strip out shift-in and shift-out characters before search.

Issue Problem Resolution

10138843/10138844 (Affects DBCS users only) DBCS characters cannot be entered in YWRKF screens. YWRKF processor changed to accept DBCS characters.

Fix Notes

A11

Fixes on PTF Tapes

Issue Problem

10138291 (Affects DBCS users only) Edit Model Object List processing fails when character string contains certain characters (for example, x'5E'). Processor fixed to allow characters from DBCS range.

Resolution

62050
The PTF tape 62050 contained the following new fixes and all previous fixes since 6.2.
Issue Problem

10078435 If an EXCUSRPGM is on YSBMMDLCRT job list, a programmer can enter a G against the job list entry and GEN is submitted for the EXCUSRPGM. The result is that the GEN ends abnormally and any source in the source member is deleted. YSBMMDLCRT processor now ignores a GEN request for an EXCUSRPGM.

Resolution

Issue Problem

10138287 If YCHGLIBL LIBLIST(*SELECT) or YSTRY2 (LIBLST(*SELECT) is entered, and Help is requested on the resulting screen, error RPG0121 (array index error in YDDSHPR) occurs. YDDSHPR corrected.

Resolution

Issue Problem

10137793 When DUS is added at the Detail Line format in a print file, the generated source has the DUS attached at the beginning of the Detail Line format extent and to the Column Heading format. DUS merge processor changed to reflect correct processing as it occurred in Release 6.0.

Resolution

A12

COOL:2E Release Summary

Fixes on PTF Tapes

Issue Problem

10137328 When DUS is attached to a field, it is generated before the field definition line in the final display or print file, resulting in a compile error. DUS merge processor changed to reflect correct processing as it occurred in Release 6.0.

Resolution

Issue Problem

10138292/10138293/10138294/10139187/10138828 (Affects DBCS users only) The Action Diagram scan processor is not omitting DBCS shift-in and shift-out characters and not recognizing certain hexadecimal characters (x'8C', x'8D' and x'8E'). Therefore it is not finding character strings and is raising the following errors: Y2V0365 Scan condition not found or Y2V0362 No function of specified name exists in specified file or Y2V0363 No field of specified name exists. Other assorted errors also occur in Action Diagram Services. The Action Diagram scan processor now excludes shift-in and shift-out characters from scan strings and allows the above hexadecimal characters.

Resolution

Issue Problem

10138289/10139184 (Affects non-English versions of COOL:2E only) Text on the Edit Function Options panel is not being translated. This also applies to the same text on the YDOCMDLFUN report if function options are selected for printing. Program changed to use correct translated text from message file Y2ALCMSG.

Resolution

Issue Problem

10138285 (Affects DBCS users only) YCHKFUNACT processing fails with intermittent run unit end because of attempt to free unallocated storage. YCHKFUNACT processor fixed.

Resolution

Fix Notes

A13

Fixes on PTF Tapes

Issue Problem

10139398 If a *RTVCND is used in an existing function that is not recompiled in version 6.2, the use of the changed version of Y2RVCNR that was supplied in Y2PTF62 (62040) may not work. Unfortunately, the only solution to this problem is either to recompile these functions in version 6.2 or to amend the source for the Y2PTF62 (62040) version of Y2RVCNR, which is supplied in QRPGSRC in Y2PTF62 (62050), so that the parameter definition is correct for your functions. Review the technical bulletin on this issue for full details.

Resolution

Issue Problem

10139185 (Affects DBCS users only) Hard-coded text on the YDOCMDLFUN report is in lowercase, which does not work with DBCS screens. Hard-coded text changed to uppercase.

Resolution

Issue Problem Resolution

10087462 (Affects DBCS customers only) *SUBSTRING option is not working in generated RPG. DBCS substring generation option is fixed.

Issue Problem

10139465 Action Diagram Editor is not allowing a *MOVE of *Job date (or other date fields) to a user-defined data type (UDDT) field (even if the UDDT field is a date field, such as an 8,0 decimal field). This was allowed in Release 6.0. This type of *MOVE was disallowed following the creation of the D8# field type. The *MOVE is now allowed again, but a warning message is issued (Y2V0589 in Y2MSG).

Resolution

Issue Problem

10139433 After a change to the job date using CL command CHGJOB, the *Job date and *Job submitted/start date are not being updated, as they were in Release 6.1. Processing in Y2RTJCR changed. Note: New source for Y2RTJCR is shipped in Y2PTF62 in QRPGSRC.

Resolution

A14

COOL:2E Release Summary

Fixes on PTF Tapes

Issue Problem

10139179 Substitution variables in EXCUSRSRC are not working if several are applied to the same source line. Problem corrected.

Resolution

Issue Problem

10138436 A SELRCD built over a RSQ access path, or over a RTV access path with only a partial key list, had incorrect parameter selection in the Action Diagram Editor. A SELRCD built over a RSQ access path now defaults to use the correct parameters. If the SELRCD uses only a partial key of a RTV access path, only those key fields are available as parameters in the Action Diagram Editor.

Resolution

62040
The PTF tape 62040 contained the following new fixes and all previous fixes since 6.2.
Issue Problem

10137869 After an upgrade from prior releases of version 6.2, compound conditions and *COMPUTE statements of more than 80 characters, and included blanks, are getting corrupted in the Action Diagram Editor. This is not affecting the generation of code, but in some cases, it was impossible to edit the statements as is. Action Diagram Editor was changed for compound conditions. When these statements are displayed in the Action Diagram Editor for the first time after the upgrade to 6.2, they still appeared with included blanks. However, following an FF into the statement, the problem is corrected.

Resolution

Issue Problem

10137571 The command YCHKLSTE fails with CPD0078 value for parameter OBJ not a valid name. Program YCHKLSTE was recompiled against correct version of YMBRLST1.

Resolution

Fix Notes

A15

Fixes on PTF Tapes

Issue Problem

10137203 The generator is not translating EXCUSRSRC substitution variables for implementation information. After installation of 62010 or 62030, this does not happen. Conversion to uppercase is for the derivation of special values. But the case remains the same for output if no special case insertion takes place for a given line.

Resolution

Issue Problem

10137145 Authorizing the Translator causes an error saying that the product has been discontinued. Licensing library YLUSLIB0 appears to be incorrect. New version of licensing program (including Translator codes) was shipped only in the YTRNSRO library, which is not used by customers who already have Toolkit or COOL:2E installed.

Resolution

Issue Problem

10137119 In RTVOBJ shared subroutine with key as I POS and O MAP PAR, 6.2 generated code is wrong and produces incorrect results when function is run. OK with 6.0. Problem was due to a rewrite of YSBRLCLR1I by BEE in 1997, during which time the code was changed so that if an LCL parameter field name is used for a real field, it is re-used every time the field is referred to in the shared subroutine. Before this time, if a field is used as an input parameter and as an output parameter, it would have a different LCL name for each usage, and the input version could not be initialized by accident.

Resolution

Issue Problem

10090412 Inserted a MOVE CON to a PAR. Copied this statement to another and then modified it from CON to DB1. Generated source is still generating the CON for the PAR fields. The result context for *Move all was not being checked as for other built-in functions. When blocks were copied and parameters altered, incorrect values could be copied to the generator causing incorrect code to be generated.

Resolution

A16

COOL:2E Release Summary

Fixes on PTF Tapes

Issue Problem

10089990 In a DSPFIL with function fields on the subfile record, the function fields do not get initialized to blanks or zeros in the subroutine MBFL#1. This causes the DSPFIL to display incorrect data at run time. A change was made to YDSPFILG1I that stopped fields being initialized twice in the MBFL#1 subroutine. However, it also stopped function fields on the subfile records from being initialized. YDSPFILG1I has been changed to ensure that function fields on a subfile record are initialized in the MBFL#1 subroutine (subfile record initialization).

Resolution

Issue Problem

10088459 Getting undefined fields in 2E-generated source, causing QRG7030 compile errors. This happens when using TS# fields on screen as output only. The undefined fields are XDI2DT, XDI2DD, XDI2MM, XDI2CC, and XDI2YY. Ensure that the internal date DS gets generated when a TS# type field is specified on the device design. This change applies to RPG generation only.

Resolution

Issue Problem

10088224 During new model creation, the text in *MSGF Y2USRMSG is being truncated. Using Spanish libraries. The problem was occurring in YRTVMSGR1R, the program that retrieves message descriptions. The program has been changed to retrieve the full length of second-level text.

Resolution

Issue Problem

10087863 During a YWRKPNL, option 8 on one of the panels gives error RPG1255 Session or device error occurred. The program YDSCDSR is detecting the error. Works fine if on the Work with Panel Title Details. YDSCDSR recompiled against correct OS/400 release for stream-file definition.

Resolution

Fix Notes

A17

Fixes on PTF Tapes

62030
The PTF tape 62030 contained the following new fixes and all previous fixes since 6.2.
Issue Problem Resolution

10089435 Device user source DUS, which worked in COOL:2E 6.0, failed to work in 6.2. Generation programs that handle DUS were corrected.

Issue Problem Resolution

10088807 Synon/TC files with the extension MSG are not being generated correctly. Generation programs changed to use code pages correctly.

Issue Problem Resolution

10088484/10087421 The incorrect version of COOL:2E program Y2RTJBR was shipped. The program was recompiled at the correct release.

Issue Problem Resolution

10087743 YCRTOBJ from a member list fails to submit anything. Member list processing corrected.

Issue Problem Resolution

10087466 YAPYMDLCHG fails under OS/400 releases V3R1 and V3R6. One program was compiled over certain OS/400 files and was updated to handle the changes in these files at different releases.

Issue Problem Resolution

10086814 YWRKUSRPRF and YWRKMNU are compiled against the wrong release. Recompiled at 6.2.

A18

COOL:2E Release Summary

Fixes on PTF Tapes

62010
The PTF tape 62010 contained the following new fixes and all previous fixes since 6.2.
Issue Problem

10090114 The YDLTMDLLST command does not remove a member in YMDLLST12L from the logical. Therefore, the RMVM from YMDLLSTRFP fails. The errors are CPF7310 and Y2E8084. The member is now being removed correctly.

Resolution

Issue Problem

10084681 Generation fails rue 1949 in YRPGDTATG1I if fix Y08340 is on libl (Issue 10078446) and *Duration has been changed to *Date increment in the Action Diagram. PTF rolled into 6.2 and corruption corrected.

Resolution

Issue Problem

10084616 Created *COMPUTE then FF and parameters are not saved. Received Undefined parameter messages. Generator and Action Diagram changed.

Resolution

Issue Problem

10083267 (1096) The move of fields to the subfile occurs twice in subroutine MBFL#1. Affects DSPFIL only. This is an RPG generator bug; COBOL looks OK. Generator corrected.

Resolution

Issue Problem Resolution

10083265 (1095) EXCUSRPGM return code is not being defaulted. Generator corrected.

Fix Notes

A19

Fixes on PTF Tapes

Issue Problem

10078446 Copying *ADD and *MULT statements in Action Diagram Editor and changing to *MOVE causes incorrect code to be generated. Generator corrected.

Resolution

Issue Problem

10078419 (1094) Customer has user source that contains a translation table in an array. He enters text in upper and lower case. When he regenerates the EXCUSRSRC, it is all converted to upper case. Generator corrected.

Resolution

A20

COOL:2E Release Summary

Index

*
*ALLPARMS field, 4-3 *DSNR locks, 6-2 *Job Data file, 7-1, 7-2 *MODULE, 2-2, 2-5 *NLL context, 7-3 *PGM, 2-2, 2-5 *PGMR locks, 6-2 *Relative record number field, 5-2

C
calls, 2-3 case, RPGIV source, 2-9 Change object function, 5-4, 5-7 CHGOBJ function, 5-4, 5-7 color, RPGIV source, 2-9 commands CRTBNDRPG, 2-2, 2-5 CRTPGM, 2-2 CRTRPGMOD, 2-2, 2-5 YCRTMDLLIB, 2-1 YCVTSPLF, 8-1 YEXCFTP, 8-8 comparisons using *ALLPARMS field, 4-3 compiler overrides, 2-4 contexts *NLL, 7-3 comparison of parameter contexts, 4-3 duplicate parameter contexts, 4-1 JOB, 7-1, 7-2 PAR, 4-1 PR1 through PR9, 4-1 Control (H) specifications, 2-4 Convert Spooled File command, 8-1 Create Bound RPG Program command, 2-5 Create object function, 5-6, 5-7 Create Program command, 2-2 Create RPG Module command, 2-2, 2-5 CRTBNDRPG command, 2-2, 2-5 CRTOBJ function, 5-6, 5-7

A
Action Diagram Editor F22 function key, 4-3 selecting statements, 3-2, 3-3 ALLPARMS field, 4-3

B
batch processing enhancements, 5-1 binding directory definition of, 2-2 YBNDDIR model value, 2-5 bug fixes, A-1 business logic, reusing, 3-1

Index1

CRTPGM command, 2-2 CRTRPGMOD command, 2-2, 2-5 customer support, 1-3

F
F22 in Action Diagram Editor, 4-3 fields *ALLPARMS, 4-3 *Relative record number, 5-2 Parameter Context, 4-2 Program Context, 4-2 File Transfer Protocol scripts, 8-8 files *Job Data, 7-1, 7-2 QRPGLESRC, 2-4 fix notes PTF tape fixes, A-10 RC1 testing fixes, A-1 FTP scripts, 8-8 functions CHGOBJ, 5-4, 5-7 CRTOBJ, 5-6, 5-7 DLTOBJ, 5-5, 5-7 EXCEXTFUN, 4-1, 4-3 EXCINTFUN, 4-1 EXCUSRSRC, 2-8 RTVOBJ, 5-2, 5-7 wrappers, 3-1

D
D option on Edit Function Parameters panel, 7-3 Delete object function, 5-5, 5-7 DLTOBJ function, 5-5, 5-7 DSNR locks, 6-2 duplicate parameter contexts about, 4-1 comparison of, 4-3 dynamic program calls, 2-3

E
Edit Function Details panel O option, 2-4 T option, 2-5 Edit Function Parameters panel D option, 7-3 N option, 7-3 Parameter Context field, 4-2 Program Context field, 4-2 X option, 7-3 Z option, 7-3 EXCEXTFUN function, 4-1, 4-3 EXCINTFUN function, 4-1 EXCUSRSRC function, 2-8 Execute Batch FTP Session command, 8-8 Execute External Function function, 4-1, 4-3 Execute Internal Function function, 4-1

H
high-level language (HLL) generators, 2-1

I
Integrated Language Environment (ILE), 2-1

J
JOB context, 7-1, 7-2 Job Data file, 7-1, 7-2

Index2

COOL:2E Reference Summary

L
language generators, 2-1 locking objects, 6-1

PGM, 2-2, 2-5 PGMR locks, 6-2 PHY access paths, 5-2 PR1 through PR9 contexts, 4-1 program calls, 2-3

M
model values YBNDDIR, 2-5 YDFTCTX, 7-3 YHLLGEN, 2-1 YRP4HS2, 2-4 YRP4HSP, 2-4 YRP4SGN, 2-9 MODULE, 2-2, 2-5 module objects, 2-2, 2-5

Program Context field, 4-2 program objects, 2-2, 2-5

Q
QRPGLESRC source file, 2-4, 2-7

R
Relative record number field, 5-2

N
N option on Edit Function Parameters panel, 7-3 NLL context, 7-3 Notepad, placing functions in a wrapper, 3-3

Retrieve object function, 5-2, 5-7 RPG4. See RPGIV RPGIV, 2-1 choosing as default language, 2-1 compiling source, 2-4 EXCUSRSRC function, 2-8 generating source, 2-4 user source, 2-7, 2-9 RTVOBJ function, 5-2, 5-7

O
O option on Edit Function Details panel, 2-4 object locking enhancements, 6-1

S
source case and color of, 2-9 compiling, 2-4 generating, 2-4 QRPGLESRC source file, 2-7 user source, 2-7 static program calls, 2-3 support, 1-3

P
PAR context, 4-1 Parameter Context field, 4-2 parameter contexts *NLL, 7-3 comparison of, 4-3 duplicate contexts, 4-1 PAR, 4-1 PR1 through PR9, 4-1

Index3

T
T option on Edit Function Details panel, 2-5 TCP/IP, 8-8 technical support, 1-3

U
User Point, placing functions in a wrapper, 3-2 user source, QRPGLESRC source file, 2-7

W
wrappers, 3-1

X
X option on Edit Function Parameters panel, 7-3

Y
YBNDDIR model value, 2-5 YCRTMDLLIB command, 2-1 YCVTSPLF command, 8-1 YDFTCTX model value, 7-3 YEXCFTP command, 8-8 YHLLGEN model value, 2-1 YRP4HS2 model value, 2-4 YRP4HSP model value, 2-4 YRP4SGN model value, 2-9

Z
Z option on Edit Function Parameters panel, 7-3

Index4

COOL:2E Reference Summary

Você também pode gostar