projex400

DSTDTA now handles SQL STRINGS for selecting data

send data from as400 to any pc using email as a spreadsheet for freeEver wanted to extract some data out of an IBMi/AS400 file using SQL and then email that data to someone as an Excel Spreadsheet?

Now you can… all from one IBMi command without having to write any CL code to do it.

I added this new function to the PROJEX400 - Distribute Data command last night – so it can now take a bite of selected data using SQL and send it as a TXT, CSV, XML or PDF as EMAIL.

Huge timesaver for me and has been on my wish-list for ages.

Example:

Projex400 Version 5 is well into its third trimester

I've been working on the new version of PROJEX400 V5.x over the last couple of months. It's running very well on one of my IBM Servers at home (the other one is sitting there waiting for me to source a copy of IBMi V5R4 from somewhere) and at least one client site.

I'm super busy working on various client projects at the moment so my spare time for Projex Development is strictly limited... But, it's basically ready for publishing and distribution all compiled at my current home server OS version of i5OS V5R1M3.

Now, I've just got to decide on a method:

  • Do I publish source code and make users upload source and compile?
  • What a REX procedure to do it automatically?
  • Do I stick with my current v5.1 OS400 or upgrade to IBMi v5.4 and recompile prior to release?
  • Do I simply package it up in a *SAVF and allow users to FTP it onto their IBM System-i?

Decisions, decisions!

While I'm waiting for my whirling dusty mental matter to coalesce into a solid decision I'm waiting for IBM to finally give me a price for IBMi Version 5.4 for Tom and Jerry (Tom and Jerry are my two iSeries Servers queitly humming away down in the "Projex Bat Cave")

Pay I.T. forward

what does this button do?

Wow! It's December already!

After a whirlwind year involving moving the whole family, two dogs and a pile of News 3x/400 magazines to this side of the pond I cant believe it's nearly 2010 already. Two thousand nine has seen us settling into our new life in the US, focussing mainly on IBMi and I feel that I've reached a kind of career milestone. After a couple of years focusing on other areas, in the IT wilderness, this year has seen my return to the IBM Midrange club and in the immortal words of Gary Glitter “I’m glad to be back

The last twelve months have seen huge changes in my personal outlook on information technology and my role within it. I've learned more about programming techniques than I thought possible and its seriously changed how I approach my role as an IBMi Developer.

I've attended a couple of fantastic conferences (Rpg World and iSeries Devcon) that have re-ignited my passion and combined with meeting a bunch of terrific IT Peeps* has helped me to evolve and shrug off my Legacy AS400 RPG Analyst Programmer skin and emerge blinking as a Modern IBMi Developer.

Download Projex400 for system i series as400

 *** WORK IN PROGRESS ***

IBM System i Download system and source control is being feverishly re-written every weekend.

So... check back later... at the moment... its much later...  ;)

Projex4i - the free IBMi Developer Toolkit

Just what is Projex4i ?

Essentially PROJEX4i (previously known as Projex400) is a free IBMi application for [as400] developers and operators. 

It's an application bursting with goodies designed to make life easier for every developer, operator and user of the IBMi AS/400 iSeries i5/OS. Speeding application development and boosting problem investigation is going to save you time and money. Projex4i is, and always has been, free!

Projex400 has been around since 1990 (originally branded PGMRAID it was renamed PROJEX400 in 1994 and is in the process of PROJEX4i right now!) and this library of commands and applets has multiplied many times over during this time. The bundle contains some really neat tools that enable you to use provided commands or menu options to present you with data in very readable formats.

Essentially PROJEX4i is a collection of Software tools; utilities, commands, procedures or any other way you choose to describe them.

Everything in the PROJEX4i Toolkit is command driven. This allows you easy access from any command line. Another bonus is that you can apply commands to areas like PDM with ease. For example, if you wanted to use the SRTSRCMBR command to upgrade your RPG source you could simply create a PDM User Defined option running the SRTSRCMBR command and then repeat that for the entire source file that you have selected using PDM.

The tools are constantly evolving and new commands, enhancements to existing commands and other optional details are being added all the time.

The main aim of PROJEX4i is simply to add functionality to areas of the IBM iSeries that are not necessarily simple to use, enhance existing commands within the operating system and to generate clear and simple displays providing detailed information in an easy to understand format.

as400 shareware 5250 screenPROJEX4i has evolved over a number of years and several different versions of OS/400: The current version is available in Risc flavours for i5/OS v5r4+

The toolkit contains many utilities aiding IBMi developers and End users in areas as diverse as:

  • Program development
  • Object Management
  • Database management
  • Documentation
  • Problem determination
  • Debugging
  • Year 2000 data management and impact analysis
  • Time planning and reporting
  • Multi-platform communications tools
  • Source file editing tools
  • User Games
  • and much more!

Extensive On-line Help1 text is available against all parameters for each command, and also available from any displayable screen.
 


NEWSFLASH (2012)

PROJEX4i is the new name for PROJEX400. It's going to be Open Source. It's work in progress but should have it all done within the next few weeks. All compiled objects sets (EGGS) will be available to download and install directly from here.

IBM System-i (AS400) Services

Projex is an authorized IBM AS/400 - iSeries - i5 software developer and IBM Business Partner

Focused on AS400 Application Programming and Systems Consulting we can also step in on an interim basis to fill a job vacancy - whether its a programmer position, project manager, or helpdesk position.

DspDocDtls: Display Document detail from any iSeries folder

Using the AS/400 default commands like WRKDOC or WRKFLR only show you the names and locations of documents in your AS/400 folders.

Using the DSPDOCDTL command enhances this by showing you details such as Owner, size, and description.

It also has the facility of showing all lower levels of subfolders, something lacking in the standard OS400 commands. When displaying all subsequent documents throughout the tree, the screen might look like this:

DbgPgm - Interactive OPM RPG Source Debug utility

 

 

Currently only available for OPM RPG.

Interactive Source Debugger for OPM RPG. Similar to the ILE Debugger, but works for Original Program Model RPG Source.
Source is displayed interactively as the program is run and breakpoints can be modified as you see them break. All variables can be displayed/altered at the press of a Function Key.

The next version is planned to work for CLP and ILE CL/RPG.

 

CvtOutq - Convert all spool files on an output queue to disk

This utility allows you to Save/Restore an output queue to a multi-member physical file.

Members from this file can then be easily transmitted using Email (see DSTSPLF) or even diskettes or networked PC’s (using DSTDTA) that want to view an AS/400 spool file.

Post Install - Setup the Core PROJEX400 System

Post installation Checkup

Once Projex400 is installed you have immediate access to all commands in the CORE system.

The following Libraries will have been created by the installation procedure:

PROJEXENV   TEST     «Software projeX» User Environment Definition

PROJEXOLD   TEST     «Software projeX» Storage for Archive Objects

PROJEXSRC   TEST     «Software projeX» Productivity/Development Source

PROJEXTST   TEST     «Software projeX» Productivity/Development Test

PROJEX400   TEST     «Software projeX» Software Toolkit

PROJEX400 is the only library you will use.

Test the main Projex menu type: GO MENU(PROJEX)

DO I NEED TO ADD PROJEX400 TO MY *LIBL?

No. Every command in the PROJEX400 Software Toolkit has been created using the *Product library which is utilised at execution time: This means that even if Projex400 is NOT in your *Libl, as long as you reference the command, it will place PROJEX400 in the *LIB as a *Product Library, just for duration of the command. You won’t need to play with library lists (unless you’re using the very handy PROJEX400/MODLIBL command which is designed to… erm… let you play with library lists).Another handy solution is to use the LOADQGPL (*ADD/*REPLACE) parameter when running the SX4INSTALL command: This will take a copy of each PROJEX400 command and place it in QGPL. Since QGPL should be in your default library list each project command will be easily accessed without having to qualify the library name.

WHAT IS THE PROJEX400 ENVIRONMENT?

The first time you use any Projex Command during a sign on, an 'Environment Definition' routine will be executed. This only happens for the first PROJEX400 command that is used, and will not reoccur for the duration of that job. This takes a couple of seconds and basically checks that all necessary objects have been defined in the Environment Library PROJEXENV: For each user PROJEX400 generates a data area, data queue and various work files in this library. If you do not like the PROJEX400 Status windows, you can elect to view standard OS400 statues messages by specifying STSMSG(*STATUS) as a parameter when executing the SX4INSTALL command (This command can be run as many times as you like).

WHAT IS THE PROJEX400 ENHANCED SIGNON?

As you use PROJEX400 you will soon find that the commands become second nature and are a great help to development and problem resolution. The best way to use PROJEX400 is to set your sign-on program so that you use the PROJEX400 initial program. This program extends the abilities of the standard IBM sign on parameters by providing the facility to use a sign on program, menu or even command. If you choose to use the PROJEX400 Enhanced Signon - you can even use it to call your existing signon program.

If you would like to use the sign on routine simply change your User Profile by typing:

CHGPRF INLPGM(PROJEX400/SX4INLPGM)

The PROJEX400 initial program parameters can be easily modified from the command line. You can either GO SX4TOOL and use the menu to change your configuration or type the SX4CONFIG command directly.

For example if you wanted to modify your own particular signon definition you would simply type:

SX4CONFIG SELECT(*USRPRF) USRPRF(*CURRENT)

As you can see from this example I am using the: MODLIBL command to set up my library list Calling a program called AUDIT which records sign on details Then Going to the Projex Main Menu And using the projex400 attention key command line You will also be able to modify the sign on parameters for other users by using the same configuration screen

CmdPnl - Command Entry Panel

This program is frequently associated with the attention key. This provides developers with a flexible command entry area, with a full menu of Projex commands.

It is a very simple single line command entry window with some advanced features. All previous commands are re-calleable by the F9 key:

Assigning it to your attention key (this is the recommended technique) allows you to enter commands from any screen on the system. Even if you are deep within an Order Entry System and do not want to stop what you are doing simply to perform some simple tasks such as WRKSBMJOB, WRKACTJOB or WRKSPLF etc…

ChkOfcMail - Check Office Mail

Check for incoming E-Mail (CHKOFCMAIL)

This command will return a message window informing you of the number of unread office mail message that you have.
It does this by interrogating the SNA/DS files awaiting delivery. So, it will also tell you if you have any outstanding SNA/DS files that may have been transmitted to you by another AS/400 on the network.

 

CHKCMNLOG - Check Communications Log

This command interrogates the communications history logs for the following applications: APPN, CFT, NETVIEW/FTP, DSNX, SNADS, FTP

It produces a printed report or will report any problems straight back to the screen.

CHGPFR - Change access paths of all logical views over a physical from one command


This command is used to affect the access path attributes of all Logical files over a specified Physical file.

This is particularly useful when performing a full data rebuild of a physical file with many logical files: If all access paths are left at *IMMED, the AS/400 will automatically spend time updating the logical file access paths for EVERY RECORD written to the file. If you are reloading a large file this can be a noticeable overhead.

The command can be used to switch all Logical files to *REBLD before the data is loaded, and switched back to *IMMED (or *DLY) after completion.

For example, when the file is returned to *IMMED after reloading all the data. The AS/400 will then recreate the logical file access paths - saving a lot of unnecessary machine work.

ADDBUG - Capture Bug information and pass to development team

Enter BUG information (ADDBUG)

Capture Joblog & Job Info . . . CAPTURE *YES

 

This command is used to record the bug information that can be viewed and tracked using WRKBUG.

It is particularly useful when testing an application that has a number of bugs. Each bug can be recorded and the resolution description can be added (using WRKBUG) when the problem has been found and corrected.

The ADDBUG command has the added benefit of allowing you to capture and store the Joblog and any dumps that were generated. This is particularly useful for the programmer that has to investigate the bug and can provide crucial information regarding the exact conditions that generated the original bug.

The big command list

If you are new to PROJEX400 you will probably find it easier to run each command from the main menus.

To access the main Projex menu type: GO MENU(PROJEX)

You can easily view a list of all the PROJEX400 command names by taking option 70 from any PROJEX400 Menu.

Ease of Use

If you set your Initial program to INLPGM(PROJEX400/SX4INLPGM) you will be presented with the Main Projex Menu with all related menus linked from here. You can tailor your signon options by using the Configuration menu (SX4TOOL) option 1 or by entering the command directly -SX4CONFIG *USRPRF. This will allow you to set certain job attributes, library list values and so on.

If you use the PROJEX400 Attention Handler you will be presented with a single line window allowing command entry (limited capability users will see the IBM command entry API). This command (CMDPNL) uses PROJEX400 in your library list as a *PRD library, all commands can be accessed from this command panel. The Command Panel allows you to process SQL commands, even on machines without SQL installed.

Online Help Text

Help text is available from all screens and is also available from every command parameter. Simply press HELP (or F1) to view help text:

Installation instructions for Projex400 on the ibm system i

You simply upload the library to the AS/400 and then run a command which will tailor your Projex400 environment to your needs.

Core PROJEX400 is now installed. It's as simple as that.

Installation works best using QSECOFR authority, or at the very least QPGMR with authority to Create and Restore libraries and other items such as Output queues, job descriptions and the IBM Job scheduler.

If you do not install the software with a user profile having this authority, you may need to manually change the ownership and grant public authority, for the installation routine to complete successfully.

We have three tried and tested methods of installation FTP, IFS REX and IFS CL. (FTP is our method of choice and easiest to use)

 

STEP ONE: UPLOAD THE 'PROJEX.400' DISTRIBUTION FILE AND RESTORE THE 'PROJEX400' LIBRARY

UPLOAD USING FTP (OVER TCP/IP)

If you are connected to your AS/400 using TCP/IP and have FTP capabilities then installation is very simple. Even if you have never used FTP before, but know the IP address of your AS/400, the upload should only take a couple of minutes.

We have included a FTP.BAT file that will automate all the FTP instructions and transfer the relevant files to your AS/400.

Edit the INSTALL.FTP file and insert the IP address of your AS/400 followed by your AS/400 Username and Password to be used for the install. If you do not know your IP Address either look in your PC Router configuration or use the AS/400 WRKTCPSTS OPTION(*IFC) command to find it.

When you edit the 'install.FTP' File you will see:

• open 111.222.333.444

• user username password replace 111.222.333.444 with your machine TCP/IP address replace "username" and "password" with the user and password to be used. Save your changes. Ensure that your AS/400 should be ready to act as an FTP Server. If you want to check; from the AS/400 command line use the command: WRKTCPSTS OPTION(*CNN) If you cannot see a connection with a local port entry that is showing "ftp-control" then you must start the FTP server manually: STRTCPSVR SERVER(*FTP) Execute the FTP.BAT file to upload the PROJEX400 *SAVF to your AS/400

The FTP.BAT file reads its instructions from INSTALL.FTP and will then upload the PROJEX.400 distribution file directly into a *SAVF (QGPL/PROJEXSAVF) on the AS/400.

A Job log will be generated in FTP.LOG. If you experience any problems check the .LOG file and attempt to correct the lines giving errors.

If you are unable to connect and/or login to your AS/400 using this method simply try one of the other techniques.

When the FTP process has completed you will have a *SAVF in QGPL called PROJEXSAVF. To check the check the save file is valid simply check that it contains the Projex400 library using:

DSPSAVF QGPL/PROJEXSAVF

You can now restore the PROJEX400 library from the *SAVF. To Restore the PROJEX400 library type:

RSTLIB SAVLIB('projex?isc') DEV(*SAVF) SAVF(QGPL/PROJEXSAVF) RSTLIB(PROJEX400)

Please check that the SAVLIB parm matches your machine type. For example, if your AS/400 is Cisc then it will read "savlib(projexCisc)" but if your AS/400 is Risc then should read "savlib(projexRisc)"

When the restore has finished you will have a library called PROJEX400 on your AS/400 and the installation routine will have 

You now need to run the PROJEX400 Installation command (SX4INSTALL), to give the application a brief health check, create a environment library, relevant help text and to tailor each command for your system.

UPLOAD USING AS/400 FOLDERS AND REX:

Create a folder to be used by the Projex installation:

CRTFLR FLR(PROJEX) AUT(*ALL)

Then map a logical PC Drive to this folder on your AS/400. For a machine called 'AS400' on a network called 'APPN' the map destination will be something like:

\\APPN.AS400\QDLS\PROJEX

Copy the "PROJEX.400" file and the "INSTALL.REX" file to the PROJEX directory on your target AS/400. When this has finished signon to the AS/400 and go to command entry. The Type (or use Cut/Paste) the following commands:

CRTSRCPF QTEMP/QREXSRC RCDLEN(112)

CPYFRMPCD FROMFLR(PROJEX) TOFILE(QTEMP/QREXSRC) FROMDOC(INSTALL.REX) TOMBR(INSTALL) MBROPT(*REPLACE) TRNTBL(*NONE) TRNFMT(*NOTEXT)

CRTPF QGPL/PROJEXPF RCDLEN(528) SIZE(*NOMAX)

CPYFRMPCD FROMFLR(PROJEX) TOFILE(QGPL/PROJEXPF) FROMDOC(PROJEX.400) TOMBR(*FIRST) MBROPT(*REPLACE) TRNTBL(*NONE) TRNFMT(*NOTEXT)

This loads the Projex400 distribution file into the general purpose library (QGPL) on your AS/400.

You can now run the REX process that will convert this file into an AS/400 Save file that is ready to be restored:

STRREXPRC SRCMBR(INSTALL) SRCFILE(QTEMP/QREXSRC)

Check the *SAVF.

When the REX process has completed you will have a *SAVF in QTEMP called PROJEXSAVF. To check the check the save file is valid simply check that it contains the Projex400 library using: DSPSAVF QTEMP/PROJEXSAVF

To Restore the PROJEX400 library type:

RSTLIB SAVLIB('projex?isc') DEV(*SAVF) SAVF(QTEMP/PROJEXSAVF) RSTLIB(PROJEX400)

Please check that the SAVLIB parm matches your machine type. For example, if your AS/400 is Cisc then it will read "savlib(projexCisc)" but if your AS/400 is Risc then should read "savlib(projexRisc)"

When the REX routine is finished you will have a library called PROJEX400 on your AS/400.

You now need to run the PROJEX400 Installation command (SX4INSTALL)

This gives the application a brief health check, creates a environment library, relevant help text and tailors each command for your system.

UPLOAD USING AS/400 FOLDERS AND CL PROGRAM:

This technique copying the PROJEX.400 file into an AS/400 folder then uses SNA/DS to convert it into an AS/400 save file. The Projex400 library is then restored from this save file.

The following instructions describe how to copy the unzipped file to a folder on your AS/400 called 'PROJEX'. This will be converted by the supplied CL program into an AS400 *SAVE File.

This means that subsystem QSNADS must be active and that the user-profile that you are running is enrolled in SNADS.

From the AS/400 command line:

CRTFLR FLR(PROJEX) INFLR(*NONE) AUT(*ALL)

Then map a logical PC Drive to this folder on your AS/400. For a machine called 'AS400' on a network called 'APPN' the map destination will be something like:

\\APPN.AS400\QDLS\PROJEX

Copy the "PROJEX.400" file and the "INSTALL.CLP" file to the PROJEX Folder on your AS/400 Sign on to your AS/400 and type this to copy the source for the install program to a Source File:

CPYFRMPCD FROMFLR(PROJEX) TOFILE(QGPL/QCLSRC) FROMDOC(INSTALL.CLP) TOMBR(SX4INSTCLP) MBROPT(*REPLACE)

CHGPFM FILE(QGPL/QCLSRC) MBR(SX4INSTCLP) SRCTYPE(CLP)

You now need to edit the program source to change the Variables &USERNAME and &SYSTEMNAME to contain the correct values, for your user profile SNA/DS enrolment. If you do not - the program assumes that your User Profile and System name are to be used.

STRSEU SRCFILE(QGPL/QCLSRC) SRCMBR(SX4INSTCLP) - and edit the variables

When you have updated the source go to the command line and create the program:

CRTCLPGM PGM(QGPL/SX4INSTCLP)

Now call the program to restore PROJEX400:

CALL PGM(QGPL/SX4INSTCLP)

After successful completion, a message will be displayed confirming that the PROJEX400 library has successfully been restored to your AS/400.

You now need to run the PROJEX400 Installation command (SX4INSTALL), to give the application a brief health check, create a environment library, relevant help text and to tailor each command for your system.

What If The Program Fails!?!

Examine the joblog and correct the error.

If SNADS errors are encountered check the following:

Your Userid is enrolled in SNADS (WRKDIR)

SBS(QSNADS) is active (WRKACTJOB or WRKSBSJOB)

You have used the correct Userid and Address (WRKDIR)

The distribution Queue for the specified Address is not in a held status (WRKDSTQ & CFGDSTSRV)

Each of these techniques is described in detail later…

 

COMPLETE THE INSTALLATION BY USING THE 'SX4INSTALL' COMMAND 

After uploading the software to your AS/400 you will now need to run the PROJEX400 Installation command (SX4INSTALL).

This gives the application a brief health check, creates an ‘Environment’ library unique to your machine, relevant help text and tailors each command for your system.

From the AS/400 command line type:

PROJEX400/SX4INSTALL USERNAME('your name') COMPANY('your company')

There are a number of parameters on the command. Press F1/HELP when prompting for information.

 YOU ARE NOW READY TO USE PROJEX400! 

 

 

a software application review of ibm as400 freeware Projex400

Projex/400 is a tool package bursting with goodies. A little brighter than some, but still as robust. The bundle contains some really neat tools that enable you to use provided commands or menu options to present you with data in very readable formats.

Even better than this - its FREE!

What is in the PROJEX400 Toolkit?

Essentially PROJEX400 is a collection of Software tools; utilities, commands, procedures or any other way you choose to describe them.

Everything in the PROJEX400 Toolkit is command driven. This allows you easy access from any command line. Another bonus is that you can apply commands to areas like PDM with ease. For example, if you wanted to use the SRTSRCMBR command to upgrade your RPG source you could simply create a PDM User Defined option running the SRTSRCMBR command and then repeat that for the entire source file that you have selected using PDM.

The tools are constantly evolving and new commands, enhancements to existing commands and other optional details are being added all the time.

 

The initial menu is broken down into the following sub-menus:

File Management Menu To work with Physical and Logical file attributes (Fields, Keys, Relations) as well as executing re-orgs, cross-dependent logicals, retrieve deleted records etc..
Data Management Menu OutQ to Disk Conversions, Editing of Data, Message Descriptions, Data Areas, along with Scans, SQL Execution and a neat utility for Duplicating/Populating/Rebuilding physicals and logicals.
Source Management Debug, Retrieve DDS, Work members, source, etc.. 
Millennium Compliancy Menu Say no more!
Network/PC Data Trans Menu Tools with transmission functions
Comms Menu Add traces, check comms logs etc.
Games Menu Only Battleships and Noughts and Crosses. No Lara Croft I'm sorry to say!
Misc Tools Un-categorized, but there is some neat stuff in there.
Cross Reference Menu Work with File, Program and DataArea Usage

Each sub menu contains an array of functions that help to make the day more pleasurable.

CRTEGG: Easy to use tool for saving, restoring and distributing System i5 Data

CRTEGG is a versatile tool for easy distribution of iSeries (AS/400) programs, objects or files.

This is used to save and compress any AS/400 library into a PC File ready for electronic transmission (ie: email, diskettes, CD, etc..) to any other user of PROJEX400 - think of this is the AS400 version of a ZIP file.

‘EGGS’ give tremendous compression, and facilitate simple transport of AS/400 data to other AS/400’s. For example, the entire PROJEX400 library loaded with data (around 20Mb) can be saved as an egg and than transported via email or posted zipped onto single diskette. Using this as an example you could type the following command:

CRTEGG LIB(PROJEX400) EGG(*CALC) EGGTYPE(*FOLDER) NESTFLR(*PROJEX) TGTRLS(*CURRENT) EGGDTACPR(*YES)

This would calculate an Egg name of PROJEX.EGG and place it in the PROJEX folder ready for you to copy to your PC for email or diskette transmission.

Note that the EGGDTACPR (*YES)parameter uses extra compression - this should only be set to *NO if you experience problems reading the Egg at the destination machine. We have found this to be a problem when sending between Cisc and Risc machines, or if there is a big difference in installed versions.

There are a few different command parameters on the CRTEGG command, all of which have extensive help text.

 

Projex dot com is the cyber home of Nick Litten an AS400 IBMi developer, RPG programmer, Web2.0 advocate, Drupal nut, early adopter and all round IT addict.

Nick Litten looking dazed while refactoring some RPG2 code to kick it into this century

Born and raised in England, now enjoying programming on the beach in Sunny Southern USA. Founder of SOFTWARE PROJEX.