Posts

Books & Blogs

Books The Little Prince - Antoine de Saint-Exupéry The Simple Path to Wealth: Your Road Map to Financial Independence and a Rich, Free Life - J.L.Collins IBM i(AS400) SQL Dropdown List of all posts @ RPGPGM.COM Using reference fields @ RPGPGM.COM Lee Dare - Software Development Principles, Plex/2e and everything else in between. How do we Check for Batch or Interactive in CLLE - Nick Litten is IBM-i, AS400 iSeries RPG Programmer and Nerd Write to joblog messages from RPGLE /FREE - easy code example using Qp0zLprintf - Nick Litten is IBM-i, AS400 iSeries RPG Programmer and Nerd #modernization Archives - Page 2 of 4 - Nick Litten is IBM-i, AS400 iSeries RPG Programmer and Nerd AS400 Modernization - Upgrading from RPG to SQL RPG for file access? - Nick Litten is IBM-i, AS400 iSeries RPG Programmer and Nerd How to use named indicators in RPG - Nick Litten is IBM-i, AS400 iSeries RPG Programmer and Nerd Converting DDS files to SQL DDL using SQ...

Stock Analysis - Example with Ashok Leyland

Image
Ashok Leyland (AL) is 2nd largest commercial vehicle in India. Disclaimer - The below items are based on personal learning over a few months so I'm not a expert and recommend ppl reading(incase anyone) to do their own research and plunge into share market. This is no way a recommendation page.  Why I'm buying AL shares in (Nov-Dec) '19 ? The current slump is temporary due to economic conditions and Axle /BS VI norms. Also this has resulted in large inventory  in Q3. So I hope to see there will be turn around in March'20.   Earnings Per Share - Net Profit dividend by Number of shares. For example - 2019 Net Profit is Rs.19832000000 / Number of outstanding shares is 2935527000.  Earning Per share is 6.76. What will be share price of AL in 2023 ? My assumption it will be between Rs.197-340 i.e. with average 20% growth year on year. Why averaging at 20% - One year it can go as high as 30% and other year at 10% . With mSME picking up volu...

PF2XLS - Python

Image
Convert Physical File / Table to Spreadsheet (Excel) using Python - Xlsxwriter and send the spreadsheet in IFS folder to email address using SNDSMTPEMM. The method is to connvert PF to csv using CPYTOIMPF in IFS then invoke python script to convert it to spreadsheet. The python script can be invoked using shell script. Now all this can be wrapped into CL. Make a custom command - PF2EXCEL. Thanks to Simon Hutchinson (RPGPGM.COM) for teaching me many things on IBM i. I learnt about shell scripting error handling from his blog. Regarding csv to excel, numerous python blog helped to learn and implement it. :-)    ** The python script i enhanced it to bold the header, add borders to columns and also graphs but missed that code during PDP refresh. But just wanted to hihglight the possibilities with python scripting. --------------------------------------------------------------------------------------------- Source code for PF2EXCEL command PF2EXCEL.sh head -1 /...

PROFOUND LOGIC - Web API (Weather App) - Part 3

Image
This blog is about making a web API called to openweathermap.org.  Yes, many have already done this i.e. just from Node.JS console but I wanted to try the same from ProfoundUI screen. I tried many open API's but felt weather app would be a good start. I'm planning to write one with ipconfig.io/json but that's for later.  Create a account with openweather and use the key to access the free current API from program. While Profoundjs has different approach to handle web API but I could not get a grasp of it. I use the traditional Node.JS method to request data . REQUEST module is most popular for making HTTP request. There is HTTP module as well but REQUEST module make it lot easier. The below code submits a HTTP GET request to URL i.e to openweather API and it will return the data i.e. in this can we can opt for HTML or JSON data.  In the below scenario, I have set the JSON:true. The same request can be used for POST, PUT or DELETE. request( URL , function( ...

PROFOUNDly LOGIC on IBM i - Part 2

Image
I started my blog’s to keep a track of things I try on IBM i - REGEXP, Python, Nodes or ProfoundJS.  Btw, I'm totally unfamiliar to JavaScript code but I feel it is good to learn but doing something. I’m learning JavaScript in every little free time I have :-) Now, in this blog its about ProfoundUI with ProfoundJS.  Profoundjs.connector provides connectivity to database i.e  IBM i Db2. Similarly Profound.js has set of API  to run processes. Profound.js has RLA & SQL API’s. I tried CRUD with SQL API. I’m writing lot of SQLRPGLE these days so I prefer it over RLA (Record level Access ). There is couple of videos with Profound TV about SQL access on how to retrieve the data. Below screen is the display file, the usual function keys are CSS buttons - click on it then enter the field name and make it as Boolean indicator, for screen field name  i.e. country code is set with Label  a nd for input field i.e. COUNTRYCD we must chose TextB...