|
Is it possible to declare a multi occurrence data strucuture as the return value from a procedure in a RPG/COBOL program. Eg Msg_dets = get_table_date ; d msg_dets ds occurs(100) d msgid 7a d msgsev 2s 0 d msgfirst 122a d msgsecnd 100a d* Thanks in advance for any help -----Message d'origine----- De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de rpg400-l-request@xxxxxxxxxxxx Envoyé : lundi 27 juin 2005 16:02 À : rpg400-l@xxxxxxxxxxxx Objet : RPG400-L Digest, Vol 4, Issue 732 Send RPG400-L mailing list submissions to rpg400-l@xxxxxxxxxxxx To subscribe or unsubscribe via the World Wide Web, visit http://lists.midrange.com/mailman/listinfo/rpg400-l or, via email, send a message with subject or body 'help' to rpg400-l-request@xxxxxxxxxxxx You can reach the person managing the list at rpg400-l-owner@xxxxxxxxxxxx When replying, please edit your Subject line so it is more specific than "Re: Contents of RPG400-L digest..." Today's Topics: 1. Re: AW: Putting Leading Zeros in Sql ? (Carel Teijgeler) 2. Re: Update a spreadsheet with data from iSeries (Booth Martin) 3. Re: Resistance to change (was free format question) (James H. H. Lampert) 4. Re: AW: Putting Leading Zeros in Sql ? (Hauser, Birgitta) 5. RE: heterogeneous connectivity through AS400 Sql? (Wilt, Charles) 6. RE: Auto-eject Printouts (Brian Piotrowski) 7. Re: heterogeneous connectivity through AS400 Sql? (Paul Morgan) 8. Re: heterogeneous connectivity through AS400 Sql? (David Gibbs) ---------------------------------------------------------------------- message: 1 date: Sun, 26 Jun 2005 22:24:39 +0200 from: "Carel Teijgeler" <coteijgeler@xxxxxxxxx> subject: Re: AW: Putting Leading Zeros in Sql ? Would not the following statement do the same? CHAR(DIGITS(MONTH(CURRENT DATE)),2) Regards, Carel Teijgeler *********** REPLY SEPARATOR *********** On 26-6-05 at 16:33 HauserSSS wrote: >Hi, > >if you use the SQL scalar function MONTH the return value is a numeric >value >and not a character string. >You have to convert the numeric value into a character string and depending >on its length, you add the leading zero or not. > >Select case when month(current_date) < 10 then '0' else '' End > concat Char(Month(Current_Date)) > from sysibm.sysdummy1 > >Birgitta > >-----Ursprngliche Nachricht----- >Von: rpg400-l-bounces@xxxxxxxxxxxx >[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Luqman >Gesendet: Sonntag, 26. Juni 2005 14:35 >An: rpg400-l@xxxxxxxxxxxx >Betreff: Putting Leading Zeros in Sql ? > > >How to put leading zeros in sql ? > >For example: > >if current date is : 1st June 2005 >Select month(current date) from sysibm.sysdummy1 >is returning 6, when I need this to be '06'. > >Any idea please ? > >Best Regards, > >Luqman > > > > >-- >This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list >To post a message email: RPG400-L@xxxxxxxxxxxx >To subscribe, unsubscribe, or change list options, >visit: http://lists.midrange.com/mailman/listinfo/rpg400-l >or email: RPG400-L-request@xxxxxxxxxxxx >Before posting, please take a moment to review the archives >at http://archive.midrange.com/rpg400-l. > > > >-- >This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list >To post a message email: RPG400-L@xxxxxxxxxxxx >To subscribe, unsubscribe, or change list options, >visit: http://lists.midrange.com/mailman/listinfo/rpg400-l >or email: RPG400-L-request@xxxxxxxxxxxx >Before posting, please take a moment to review the archives >at http://archive.midrange.com/rpg400-l. ------------------------------ message: 2 date: Sun, 26 Jun 2005 18:33:44 -0500 (Central Standard Time) from: "Booth Martin" <booth@xxxxxxxxxxxx> subject: Re: Update a spreadsheet with data from iSeries I meant that putting known good data into two of the cells is a method to determine the problem. If you insert known good data into two of the cells and the problem disappears for those two cells you'd know it is a data issue. --------------------------------- Booth Martin http://www.martinvt.com --------------------------------- -------Original Message------- From: RPG programming on the AS400 / iSeries Date: 06/24/05 17:30:22 To: RPG programming on the AS400 / iSeries Subject: Re: Update a spreadsheet with data from iSeries Will put it on my 'what to do on a sunny saturday' list :-) Btw: Think400.dk/adhoc_2.htm#eks0011 has some examples about 'Centering a string in a field' Leif ----- Original Message ----- From: "Booth Martin" <booth@xxxxxxxxxxxx> To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> Sent: 24. juni 2005 21:28 Subject: Re: Update a spreadsheet with data from iSeries just for fun, can you put good data in two of the cells? Use upddta or whatever, but see if anything changes. --------------------------------- Booth Martin http://www.martinvt.com -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. . ------------------------------ message: 3 date: Mon, 27 Jun 2005 00:28:45 -0700 from: "James H. H. Lampert" <jamesl@xxxxxxxxxxx> subject: Re: Resistance to change (was free format question) Let me put it another way. Consider FORTRAN. You HAVE all at least HEARD of FORTRAN, whether or not you can read it or code it, right? Now consider ANSI-66 FORTRAN IV, as compared with primitive FORTRAN on the one hand, and FORTRAN-77. They're all distinct dialects, with some mutual incompatibilities, but they're all recognizably FORTRAN (unless they're coded for that dreadful CDC free-format FORTRAN "standard"!) Or consider BASIC. It is itself a recognizable derivative of FORTRAN, with greatly simplified syntax, and free formatting of source (but you pay for it with mandatory line numbers, and no way for separately compiled pieces of code to call each other.) Old Dartmouth BASIC, IBM VS-BASIC, DEC BASIC-Plus, Altair BASIC, Radio Shack Level II BASIC, Apple Integer BASIC, Applesoft, PET BASIC, and GW-BASIC are all distinct dialects of BASIC, but they're all recognizably BASIC. Now consider some things that happened some years ago at ETH, mostly by the hands of Niklaus Wirth: He wrote a teaching language, designed to force incorrigibles to write structured code. Indeed, it was so fussy about structure that there were a number of constructs that were perfectly valid from a structured programming standpoint, that couldn't be implemented in this language without either using backdoors (like using a DOWHILE or DOUNTIL loop to do the job of a FOR loop) or violating structured programming rules. But then again, he never intended Pascal as a production language, only as a teaching language. When people started clamoring for a Pascal-like language for production use, he came up with a language that added a lot of new features, particularly aimed at code re-use. Did he call that new language Pascal II? No; he called it Modula, and the most popular implementation of it was his second try, called Modula II. Consider an area outside of HLLs. Consider word processors. WordPerfect was a marvelous word processor, and an industry standard for many years. It was lean, and it ran like the wind even on fairly old, fairly small, fairly slow hardware. But it wasn't a sophisticated typesetting system, and didn't pretend to be: if you wanted that, you got one: PageFaker, if you wanted slickness, or were just jumping on the bandwagon because everybody else was on it (and if everybody else jumped off a cliff . . . ?), or Xerox Ventura Publisher, if you wanted the text to stay in the original word processor file (WordPerfect, Wordstar, MS Word, or whatever), and you wanted the finished document to look like people who knew what they were doing had spent hundreds of hours setting it in real type. Then along comes Microsloth, and decides that the very idea that other companies are making money selling typesetting software offends them. So they start building pseudo-typesetting capability into Word for Windoze. What happens? People stop using separate typesetting applications, and the standard of quality for computer-generated documents (already rather low, thanks to PageFaker) takes a nosedive. I see something similar happening in HLLs: the die-hards who seem to actually believe that their language is truly the one to render all others obsolete set out to remake their respective chosen languages into something they're not. And in the process, the unique strengths of those languages often get cast aside. And you end up with people claiming to be RPG programmers, who don't know what "The Cycle" is, much less how to make productive use of it in ways both conventional and unconventional. More than likely, they also know very little about RPG's file I/O. They end up writing programs that they may as well have been written in Old Dartmouth BASIC, for all the advantage they take of RPG's strengths. Then, too, how many people are pushing ILE, and yet ignoring ILE's greatest strength: the ability to achieve static linkage between modules written in different languages. You don't do that, and you don't even think about using service programs where appropriate, and you may as well go back to OPM.
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.