|
Al Macintyre says I use CALL QCMD all the time, which turns 2 command lines into several lines & shows a variety of commands that can go to full screen. Also with F4 on the commands, I can do batch commands that are longer than what fits on any screeen. I also go to F10 to show past commands so that I can F9 on any for retries. I do not know about you fella, but I suffer from a malady called EL TYPO which means that frequently brain connected to fingers, does not type some string of characters with correct precision intended, so that by operating my Command Line functions from CALL QCMD with F10 visibility of what IBM said I did wrong & cursor on past oops with F9 my recovery is rapid. We operate in an environment with many user menus & I have a group of end users who are quite versatile at helping their fellow users as like mini-help-desks. I have designated those individuals as POWER USERS & given them access to CALL QCMD in which that is embedded in a CL for ease of putting it on their menus & also for ease of security, since our ERP is controlled by 3 letter prefixes, I can limit some command line access based on the 3 letter deal. However, if your work place does not already have a standard menu generator provided by the primary applications package, IBM has a language for creating menus in which each option can call up one of your pre-written batch files. This is SDA which you get into via STRSDA. While IBM menus are accessed from command line via GO like GO CMDPDM to get at all commands involved in the Programmer Development Manager subsystem, menus created via SDA are accessed via CALL, such as every nite I do CALL NITE which gets me to a menu of options needed for each evening's backup & related duties, in which I have el typo insurance. I have created thousands of files on our AS/400 which are similar to the batch files of MSDOS. OS/400 has a different lingo or terminology for this kind of thing, but functionally they are very similar. We key in a familiar "command string" and it can be governed by the same "wild card" rules of IBM with respect to the significance of ASTERISK and QUESTION MARK. I do not consider myself to be proficient at this, but I do not see how anyone can do any programming on OS/400 without having this as one of our most fundamental skills. If I was you, I would order own personal copy of the CL programming manual ... the little one, not the full library on what every IBM command does, which I also have. There is also a hand held OS/400 Programmer's Reference Manual which is about the size of Reader's Digest Magazine, that I find to be extremely useful, but you need to have some modicum of training in the languages referred to in there before getting a lot of value from it, in my opinion. There are also a number of books on CL programming, independent of what IBM publishes. Check out Duke Publishing. I don't have any titles handy. There used to be several outfits that published such things, but all their stuff is now available through Duke. You may also be able to purchase the hand outs that were used at seminars on CL at COMMON ... at one time you did not have to be a COMMON member to buy these ... I do not know if that is still true. http://www.common.org I suggest a subscription to News/400 magazine & an effort by you to get a hold of back issues available on CD Rom. This is a publication of the nuts & bolts of programming on OS/400 & it is chock full of examples. AS/400 Magazine is not as good for this, but it does come with a free set of tips ... you have to know what to ask for ... in which several years of articles giving tips are consolidated in one useful reference booklet. IBM has classes on this ... the CL class & its prerequisite. http://www-3.ibm.com/services/learning/lsweb/educationcenters/ http://www-3.ibm.com/services/learning/community/as400/ CL is a compiled language. The batch command is written in the language CL. My CL programs are in members of a file called QCLSRC because I follow the IBM standard of Q (Q means IBM rules but not neccessarily IBM content) then name of the language, then SRC for source. I access my source via WRKMBRPDM which means work with source members using PDM. There are other ways that I have tried, but this is the one I am most comfortable with. I have several libraries of CL source programs. CL programs involved in various complex software that is in testing. CL programs involved in what has passed testing & is now in production. CL programs that CALL RUNQRY(some definition) then various parameters to give user access to selection criteria before it executes, and the line immediately before the CALL RUNQRY has an OVRPRTF that labels the Query report with a USRDFA User definition that clearly distinquishes one Query report from others, and also does some other stuff to make the whole thing more user friendly for my people. When I am inside the editor for CL and I have keyed part of a command, I can F4 on it & this is just like F4 on regular command line, in which F4 goes many layers ... commands can be embedded in commands - I have gone several layers deep, in which I F4 every time so IBM will get the syntax right for me & I can focus on what the heck I am trying to do. The AS/400 Network has a style manual on line reccommending how CL programs should be structured so that your programs are clean & clear & elegant, understandable to any other CL programmer. The network also has a forum for CL programmers to ask each other questions. You can learn a lot by lurking there & seeing what questions other people have asked & what the answers were. http://www.as400network.com/Forums/Index.cfm?cfapp=55 Different AS/400 forums have different styles & different kinds of search engines to get at the info, which is good ... different people are comfortable with different ways of communicating. There is also a CL forum at http://www.midrangecomputing.com/forums/ You might also check out the archives for this midrange_L since yours is not the first question there has been on this topic. Philipp Rusch gave some excellent advice, suggesting some ideas that I would not have thought of. Via WRKOBJ QCLSRC F4 then *ALL libraries you can identify all the CL source libraries on your system, so that you can look at different kinds of examples. I trust that I have given you information that is immediately of value & info that you will be reviewing later as you get into this a bit deeper. Be sure to post another message here if you get stuck. Lots of people are happy to help out. > Subj: BATCH commands in AS400 > Date: 09/03/2000 7:16:17 AM Central Daylight Time > From: Mustafa_Yorgancioglu/RPRWyatt%RPRWYATT@RPRWYATT.COM > > Hi, > I was wondering if anyone could tell me how to create batch files on AS400 > - like the .bat files in MSDOS, or the shell files in UNIX. I am having > trouble issuing large commands from the 5250 emulation screen which only > allows two-lines of commands at a time. > Thanks. > > Mustafa Yorgancioglu > RPR Wyatt Inc. > Phoenix, AZ. > Mustafa_Yorgancioglu@rprwyatt.com > http://www.rprwyatt.com > 602-263-7779 Al Macintyre ©¿© MIS Manager Green Screen Programmer & Computer Janitor of BPCS 405 CD Rel-02 running on AS/400 V4R3 http://www.cen-elec.com Central Industries of Indiana--->Quality manufacturer of wire harnesses and electrical sub-assemblies +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.