|
Here's the event you've all been waiting for! Just cut and paste the completed ballot and mail it to George. Cheers! And Happy Holidays! Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com ---------------------- Forwarded by Hans Boldt/Toronto/IBM on 12/22/2000 12:21 PM --------------------------- George Farr 12/22/2000 11:27 AM To: RPGCustomers From: George Farr/Toronto/IBM@IBMCA Subject: Future RPG IV enhancements, you have been selected to vote Good day. As usual, myself and the whole RPG IV development team would like to have your input on future RPG IV enhancements. This is your chance to influence what goes in a future release of the RPG IV language. YOU ARE ON THE VOTERS LIST! YOU ARE ELIGIBLE TO VOTE! DON'T MISS THIS CHANCE TO VOTE! Same rules apply as before, you have $100 to spend. Fill your election ballot with up to $100 worth of the following proposed enhancements. Be careful not to spend more than $100. If you do, your votes will not be counted. Also, we gurantee no recounting!@#$ Vote by marking an 'X' between the square brackets [ ] at the beginning of each selected item in the ballot. More detailed descriptions of each item follow the ballot. Please return your completed ballot to farr@ca.ibm.com We welcome any additional comments or any enhancements you think should be considered. I am asking my RPG technical leads: Hans and Barbara to post this note on forums and newsgroups as well. Please note, this is just to prioritize our line items for the next release (after V5R1). Thanks in advance and happy holidays. ==================================================================================================================== Mark an X for the items you want totaling no more than $100. e-mail the completed ballot to farr@ca.ibm.com. [X] Num Cost Summary --- --- ---- ------- [ ] 1 $4 H-spec keyword EXTDEFS - internal format of ext fields. [ ] 2 $6 %INT, %UNS, %FLOAT, and %DEC convert character to numeric. [ ] 3 $12 RANGE and VALUES keywords. [ ] 4 $8 Built-in functions for bitwise operations in expressions. [ ] 5 $6 SORTA arr1 {: arr2 ...} WITH key_arr1 {: key_arr2 ...} [ ] 6 $2 Extender on SORTA to reverse the order of sorting. [ ] 7 $2 DEBUG(*RETVAL) to allow debugging of procedure return values [ ] 8 $4 EXTNAME to indicate types of fields to extract for EDS. [ ] 9 $8 Keyed I/O enhancements: %KLIST, %KDS. [ ] 10 $4 OPTIONS(*VARTYPE) to bypass type match of procedures parms. [ ] 11 $4 New BIFs %TESTD, %TESTT, and %TESTZ. [ ] 12 $20 Allow dynamic resizing of arrays and multi-occurrence DS. [ ] 13 $2 Format change on a LIKE define for numerics. [ ] 14 $4 New keyword, RECPREFIX, to prefix record-format names. [ ] 15 $4 DIM(*FIT) with overlay field. [ ] 16 $20 Multiple-dimension arrays in expressions. [ ] 17 $8 SPECIAL files to handle all I/O opcodes, including keyed ops [ ] 18 $8 List of fields to update specified on opcode UPDATE. [ ] 19 $4 Keyword DTAARAVAR to specify field to hold DTAARA name. [ ] 20 $2 %OFFSET builtin function returns offset of subfield. [ ] 21 $10 Short form assignment operators += -= *= /= **= [ ] 22 $10 Multiple array element initialization. [ ] 23 $2 Allow DS name on I/O operations to externally desc files. [ ] 24 $4 Keyword EXTDESC to identify name of external description. [ ] 25 $10 Dynamic specification of basing variable, ie "p->var". [ ] 26 $20 Keyword DIM allowed on data structure. [ ] 27 $20 Keyword LIKEDS allowed for data structure subfield. [ ] 28 $8 Option *ZEROFILL on %EDITC to include leading zeros. [ ] 29 $8 Option to edit negative numbers using parentheses. [ ] 30 $4 ALIAS name support for externally described data structures. [ ] 31 $20 Stream file I/O for IFS files. [ ] 32 $2 Second parameter on %TRIMx - char to trim. [ ] 33 $6 Built-in function %COND(condition:truevalue:falsevalue). [ ] 34 $10 File device types for I/O to data queues and sockets. [ ] 35 $30 Allow expressions as parameters to keywords. [ ] 36 $30 Full null field support. End of ballot ================================================================================================================== Detailed Descriptions ------------------------------------------------------------------------- #1 $4 H-spec keyword EXTDEFS to indicate that the internal format of a field should be the same as the external format. This would mean that all external formats for fields must be the same. (This would be a problem for programs that have a field defined as packed in the database but zoned in the display file. Alternatives: 1) error if conflicting definitions, 2) first definition takes precedence) ------------------------------------------------------------------------- #2 $6 %INT, %UNS, %FLOAT, and %DEC can take character strings as arguments. If the string contains a valid representation of a number, the numeric value would be returned. If the string argument is not a valid number, an exception would be issued. Non-exception statuses could indicate other errors, such as excess non-digit characters in string. ------------------------------------------------------------------------- #3 $12 Allow specification of the values allowed for a field with D spec keywords RANGE and VALUES. Example: D temperature S 10i 0 range(-60: 120) D command S 3a values('ADD': 'DEL') If a value is assigned that is not correct, an exception would be given. The TEST operation (and possibly a %TEST built-in function would be allowed for the field. If the field is used, and it has an incorrect value, an exception would be issued. ------------------------------------------------------------------------- #4 $8 Built-in functions for bitwise operations in expressions. Allows integer/unsigned OR character operands %bitand(x : y {:z ...} ) %bitor(x : y {:z ...} ) %bitxor(x : y {:z ...} ) %bitnot(x) Example: x = x'01A5' = B'0000 0001 1010 0101' y = x'11B3' = B'0001 0001 1011 0011' %bitand(x:y) = x'01A1' = B'0000 0001 1010 0001' %bitor(x:y) = x'11B7' = B'0001 0001 1011 0111' %bitxor(x:y) = x'1016' = B'0001 0000 0001 0110' %bitnot(y) = x'EE4C' = B'1110 1110 0100 1100' Decimal numerics are converted to integer form. Float not allowed. Rules for unequal-length operands: left-padded with x'00' for numerics, right-padded with x'00' for characters. ------------------------------------------------------------------------- #5 $6 SORTA arr1 {: arr2 ...} WITH key_arr1 {: key_arr2 ...} All the arrays including key_arrays are sorted, but the sort sequence is determined by the key arrays. (For identical key values in key_arr1, values in subsequent key arrays are used.) ------------------------------------------------------------------------- #6 $2 Extender on SORTA to specify the order of sorting. SORTA(A) for ascending, SORTA(D) for descending. This would normally be used for non-sequenced arrays. (If a sequence is specified on the array definition, this extender must match if specified.) ------------------------------------------------------------------------- #7 $2 Option DEBUG(*RETVAL) to allow debugging of procedure return values: EVAL _QRNU_RET_procname ------------------------------------------------------------------------- #8 $4 EXTNAME to indicate what types of fields to extract for externally described data structures: EXTNAME(filename{:recordname{:what}}) where what can be *ALL, *INPUT, *OUTPUT, INPUTONLY, *OUTPUTONLY, *KEY ------------------------------------------------------------------------- #9 $12 Keyed I/O enhancements: Allow a list of key values with the keyed I/O opcodes. For example: chain %KLIST(StoreNum: Date - %months(1): Salesman) OrderFile; Each search argument must match the type of the corresponding key in the database file. A search argument may be any valid expression and doesn't have to match the length of the key. (Character search arguments are truncated or padded with blanks, etc.) Allow a data structure name to be specified as the search argument on the keyed I/O operations. For example: chain %KDS(KeyDataStruct:2) OrderFile; Each subfield in the DS must match the type of the corresponding key in the database file. 2nd argument to %KDS specifies number of subfields to use (defaults to all subfields). ------------------------------------------------------------------------- #10 $4 OPTIONS(*VARTYPE) on a parameter definition for reference parameters to bypass type checking for the parm. A pointer parm would be coded in the PI for that parameter. It would be the responsibility of the programmer to access the data using based variables of the expected types. ------------------------------------------------------------------------- #11 $4 New BIFs %TESTD, %TESTT, and %TESTZ to check if a particular string is a valid date, time, or timestamp value. The 1st argument is the string to check; the 2nd is a format. This can also be used to check if a date can be converted without error to a different format. New BIF %TEST to check if a particular variable has a value that's consistent with the variables definition. For example, to check if a zoned decimal variable has proper numeric data. ------------------------------------------------------------------------- #12 $20 Allow dynamic resizing of arrays and multi-occurrence data structures. This would mean that SORTA, LOOKUP and range-checking would use the new size. For based arrays, the programmer would be responsible for storage management. For non-based arrays, the compiler would handle it. Array/mods is prefixed in storage by current number of elements. Example of extending sizes of arrays: D mods DS OCCURS(10:*VAR) D array S 10A DIM(100:*VAR) D basedarr S 1A BASED(P) DIM(32767:*VAR) /free %ELEM(array) = new_size; %OCCURS(mods) = new_size; // Example of accessing based varying-sized array: monitor; // Try to assign to i'th element of array basedarr(i) = 'x'; on-error 121; // Array index out of range // If we don't have storage yet for i'th element, // reallocate storage for array: p = %realloc(p: i * %size(basedarr)); %elem(basedarr) = i; basedarr(i) = 'x'; endmon; /end-free ------------------------------------------------------------------------- #13 $2 Format change on a LIKE define for numerics. For example: D fld1 s 5s 0 D fld2 s p like(fld1) D fld3 s 5a D fld4 s p 3 like(fld3) ------------------------------------------------------------------------- #14 $4 New keyword, RECPREFIX, to prefix record-format names to save having to do all the renames. ------------------------------------------------------------------------- #15 $4 DIM(*FIT) with overlay field. Number of dimensions is computed based on what will fit into the overlayed field. (Valid only if the array fits exactly.) ------------------------------------------------------------------------- #16 $20 Multiple-dimension arrays. Cost includes only support in free-form calcs and Extended-Factor-2 opcodes. ------------------------------------------------------------------------- #17 $8 Extend special-file support by allowing F-spec keyword SPECIAL for all device types. For example: FkeyedFile if e k disk SPECIAL('MYLIB/MYDRIVER') C key chain keyedFile ------------------------------------------------------------------------- #18 $8 List of fields to update specified on opcode UPDATE. Example: update OrderFile %FIELDS(Quantity:SalesmanId); ------------------------------------------------------------------------- #19 $4 New keyword DTAARAVAR to specify variable name to hold name of data area. The name can be library-qualified. Example: D daname S 21A INZ('LIB/AREA') D area DS DTAARAVAR(daname) D area2 DS DTAARAVAR('RESULT') ------------------------------------------------------------------------- #20 $2 %OFFSET builtin function returns offset of subfield from beginning of an overlaid-on subfield (or the DS) %OFFSET(fld {: containing_subfield}) where 2nd subf defaults to DS. ------------------------------------------------------------------------- #21 $10 Short form assignment operators "+=", "-=", "*=", "/=", "**=": Examples: /free str += 'text'; // append 'text' to str date += %days(7); // add 7 days to date num -= 17; // decrement num by 17 num *= 2; // multiply num by 2 array(findStart(array:start)+offset) += 1; /end-free In the last example, the array index is computed only once. ------------------------------------------------------------------------- #22 $10 Multiple array element initialization: D ARRAY S 10i 0 dim(5) inz(%list(1:3:5:7:11)) ------------------------------------------------------------------------- #23 $2 Allow data structure name on I/O operations to externally described files. Record is read into the specified data structure. (Now currently allowed only for program described files.) ------------------------------------------------------------------------- #24 $4 Keyword EXTDESC to identify name of externally described file that contains file description to be used at compile time. ------------------------------------------------------------------------- #25 $10 Dynamic specification of basing variable: D basedchar s 1A based D p s * /free p->basedchar = '1'; (pa(12)+offset)->basedchar = '2'; /end-free Pointer notation required for based vars without basing ptr. Basing pointer can be any pointer valued expression. ------------------------------------------------------------------------- #26 $20 Keyword DIM allowed on data structure. Like multiple- occurrence data structure, but data structure can be indexed like an array: D parts ds dim(10) D qualified D descr 20A D quantity 10I 0 D discounts 10I 0 dim(5) /free if parts(i).descr = parts(j).descr; dsply 'identical parts'; d = parts(i).discounts(level); endif; /end-free (This can provide 2-dimension array functionality.) ------------------------------------------------------------------------- #27 $20 Keyword LIKEDS allowed for data structure subfield. Allowed only for QUALIFIED data structures. Subfields are accessed by dot notation: DS.SUBF1.SUBF1A ------------------------------------------------------------------------- #28 $8 Option *ZEROFILL on %EDITC to include leading zeros in edited value. Examples: num = -1234.56; // packed(15,2) %editc(num:'A':*ZEROFILL); // "0,000,000,001,234.56CR" %editc(num:'P':*ZEROFILL); // "-0000000001234.56" ------------------------------------------------------------------------- #29 $8 Option to edit negative numbers using parentheses. Option *PARENS allowed for edit codes 1-4. For example: num1 = 1234.56; // packed(15,2) num2 = -1234.56; // packed(15,2) %editc(num1:'1':*PARENS); // returns " 1,234.56 " %editc(num1:'4':*PARENS); // returns "( 1234.56)" ------------------------------------------------------------------------- #30 $4 ALIAS name support for data structures. Alias name is used instead of regular name for subfields of externally described data structures. Example: D struct E DS EXTNAME(file:rec:*ALIAS) ------------------------------------------------------------------------- #31 $20 Stream file I/O for IFS files. ------------------------------------------------------------------------- #32 $2 Optional second parameter on %TRIM, %TRIML, and %TRIMR to identify character to trim off of the string. ------------------------------------------------------------------------- #33 $6 Built-in function %COND(condition:truevalue:falsevalue). This BIF evaluates the condition. If the condition evaluates to *ON, the "truevalue" is evaluated and returned. Otherwise, the "falsevalue" is evaluated and returned. The true and false values must both be the same type. For example: eval n = (y = 0 : 0 : x / y) ------------------------------------------------------------------------- #34 $10 File device type DATAQ for reading from and writing to data queues. Would allow same opcodes as for sequential or keyed disk files. File device type SOCKET for sequential reading from and writing to sockets. ------------------------------------------------------------------------- #35 $30 Allow any arbitrary expression as parameter to any H-Spec, F-Spec, or D-Spec keyword, provided the expression has a value computable at compile-time. For example: D const C 17 D array1 S 1A DIM(const+34) D array2 S 1A DIM(%ELEMS(array1)*2) ------------------------------------------------------------------------- #36 $30 Full null field support. Fields can be declared as null- capable within D-Specs. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.