× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Doug,

Thanks for the input... you remmember a heck of a lot more than I do, it's
so long ago.

The reason for this is because a small CL pgm needs to be created.  The need
was discovered after an upgrade had been distributed and we need to get this
pgm to the customers quickly (somehow the pgm was omitted from teh
distribution media).

I was looking for a simple "type this, press enter.  type this, press
enter."  step by step way to get this 5 line CL into a source file.  It has
to be as simple as possible for the installer who may not be technically
inclined.


I did some more digging and came up with this:

CRTSRCPF FILE(QTEMP/QS36SRC) RCDLEN(120)  

STRS36

// LOAD $MAINT                                      
// RUN                                              
// COPY FROM-READER,LIBRARY-S,NAME-TEST,TO-QTEMP   
PGM              
  code here
ENDPGM           
// CEND
// END

ENDS36

CRTCLPGM QTEMP/TEST SRCFILE(QTEMP/SOURCE) 


And this does the trick.

I looked into using STRDBRDR or SBMDBJOB but in both cases the source had to
be in a file already, which was the rub.


Thanks all for the help!


Tom

 |  -----Original Message-----
 |  From: Douglas Handy [mailto:dhandy1@xxxxxxxxxxxxx]
 |  Sent: Wednesday, December 10, 2003 16:01
 |  To: RPG programming on the AS400 / iSeries
 |  Subject: Re: $MAINT anyone?
 |  
 |  
 |  Tom,
 |  
 |  >I'm kind of hazy about it but I think it went something like this:
 |  
 |  Close.  Instead of // DATA, it had the normal // RUN.  Then 
 |  the utility program
 |  started reading records from the OCL (or keyboard) until // 
 |  END was detected.
 |  Lots of SSP utility programs did this, not just $MAINT.  
 |  Most of them did,
 |  including #GSORT.  User RPG programs could even do by using 
 |  IBM-supplied
 |  assembler subroutine SUBR01 which provided "sys in" support.
 |  
 |  >With the result that your file then contained those records.  
 |  
 |  Not really.  The result was that each line was passed as 
 |  input to the utility
 |  program to do with as it pleased.  In the case of $MAINT, 
 |  it would look for
 |  records beginning // COPY ... and parse out the member name 
 |  etc and populate a
 |  library member until it reached // CEND, but that was just 
 |  because that is what
 |  $MAINT did with the data it got.  SysIn processing just 
 |  provided to the caller
 |  the contents of the next line of system input -- the 
 |  interpreted OCL procedure
 |  (if in a proc) or from the keyboard if the program was 
 |  loaded directly from the
 |  keyboard.
 |  
 |  >I only need to
 |  >enter a half dozen records or so and I don't want to use 
 |  DFU or EDTF.  Is
 |  >there a similar function on the 400?  Any ideas on some 
 |  other method? 
 |  
 |  There are numerous ways to accomplish different objectives. 
 |   How about
 |  explaining the scenario of what you are trying to do, and 
 |  someone can give
 |  suitable recommendations.
 |  
 |  Doug
 |  _______________________________________________
 
 |  

This communication is confidential, intended only for the named recipient(s)
above and for the purposes stated herein. It may contain trade secrets or
other information that is exempt from disclosure under applicable law.
Except as otherwise authorized in writing, any use, dissemination,
distribution, or copying of this communication by or to anyone other than
the named recipient(s) or for any purpose other than the purpose as stated
or intended herein is strictly prohibited. If you have received this
communication in error, please immediately notify SDD by calling us at (561)
276-7004. 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.