Introduction to SQLRPGLE in IBM i - for Beginners

  Рет қаралды 33,620

Yusy4Code

Yusy4Code

Күн бұрын

This video covers the basic concept of SQLRPGLE in IBM i (AS400),
This covers below topics,
1. Simple SQLRPGE select
2. Dynamic SQL statement
3. Create drop table using SQLRPGLE
4. Reading file using Cursor
5. Scroll cursor

Пікірлер: 63
@abekelly9935
@abekelly9935 4 жыл бұрын
Excellent presentation sir. Best regards
@yusy4code
@yusy4code 4 жыл бұрын
Thanks for ur feedback sir...
@higiniofuentes2551
@higiniofuentes2551 7 жыл бұрын
OMG! Thank you Mohammed! A very dense video but with a lot of explanations. VERY useful. Higinio
@zavedalimeer4047
@zavedalimeer4047 4 жыл бұрын
A very nice explanation. please do more videos.
@seancollins1734
@seancollins1734 2 жыл бұрын
Nice video.
@gugun2660
@gugun2660 Жыл бұрын
Awesome❤
@kaattupoochi5992
@kaattupoochi5992 4 жыл бұрын
One doubt bro... What is the use of Set option commit = *None ?
@aapurvagarwaal3635
@aapurvagarwaal3635 3 жыл бұрын
Thanks Yusuf for the video. Excellent Explanations. I have a doubt regarding the fetching of the record. The records fetched will be basis on the keys in the Database or RRN. If I sort by different keys using order by other than mentioned in the DDS of the file , will the fetching of records work like in accordance with order by clause.
@yusy4code
@yusy4code 3 жыл бұрын
I feel so. The record should be fetched according to the SQL command.
@BudiSantoso-er6cq
@BudiSantoso-er6cq 6 жыл бұрын
Thanks Sir.. God bless you.
@yusy4code
@yusy4code 6 жыл бұрын
Budi Santoso ThankYou 🙂
@krishnachaitanyapulicharla82
@krishnachaitanyapulicharla82 4 жыл бұрын
Hi... very good understand video for me to assign to var and ds, I have a question,, SET OPTION COMMIT is mandatory to declare or ?, pls share some brief about
@rajkirank5499
@rajkirank5499 2 жыл бұрын
Is there any url can get more number of sqlrpgle examples
@Toribiogp2
@Toribiogp2 3 жыл бұрын
Que buen video amigo. And I have a question, Could I call a sqlrpgle external program from a sqlrpgle program? Thanks for all.
@gavaskarchittim9204
@gavaskarchittim9204 6 жыл бұрын
Hi Yusuf,Nice explanation easy to understand ..have small doubt ... in what scenario normally we go for Embedded SQL rather that LF,OPNQRYF
@yusy4code
@yusy4code 6 жыл бұрын
It is clearly seen that if we need to handle complex SQL statement then we can go for Embedded SQL rather than LF. But LF comes handly if our requirement is simple. E.g. Retrieve data based on certain conditions. OPNQRYF will be useful if we want to execute a query in CL. But there are alternatives like RUNSQL command etc.
@paolonervi2208
@paolonervi2208 3 жыл бұрын
Hi Mohammed, thank you for your videos! I tried to compile the first SQLRPGLE example putting the source in an IFS file. No way to make it work. Do you have any thoughts about it ? Is it mandatory to put the source in the classic QRPGLESRC file and define the type as SQLRPGLE...or is any way to make it working also with the source in an IFS file? Thank you for the time you dedicate answering to me. Greetings from Italy.
@sandhyanandyala8825
@sandhyanandyala8825 5 жыл бұрын
What is the use of set option Commit = *None at start of pgm
@marcelofirmapaz5724
@marcelofirmapaz5724 6 жыл бұрын
Genio total!!!
@yusy4code
@yusy4code 6 жыл бұрын
Gracias..!!!
@PRAVINCHOTHE2008
@PRAVINCHOTHE2008 6 жыл бұрын
Hye Yusuf, Nice initiative bro.. remember me... same project DFS - from CSM team.. keep going bro..
@yusy4code
@yusy4code 6 жыл бұрын
Yes.. How can I forget.. those night shifts and production calls :)
@PRAVINCHOTHE2008
@PRAVINCHOTHE2008 6 жыл бұрын
ya bro...
@thabangnukeri6622
@thabangnukeri6622 Жыл бұрын
Hi Yusuf, I tried using the same login to read from a PF and store multiple rows into a Data Structure. I still get SqlCode = -811. Is there anything i could be doing wrong or you suggest?
@raghumohanreddykasarla2844
@raghumohanreddykasarla2844 7 жыл бұрын
Can you please explain the same concepts in COBOL..
@sehrishsaiyed4118
@sehrishsaiyed4118 2 жыл бұрын
Hi I am really stuck at a point in a project and need your help
@krishnap2867
@krishnap2867 6 жыл бұрын
ya yusuf, easy way ofunderstanding things are you done
@ramstein74
@ramstein74 6 жыл бұрын
do i need to load the file as you did in the second line of the rpg FStudPF IF E K Disk ???
@yusy4code
@yusy4code 6 жыл бұрын
Actually Not (If we are going to use only Embedded SQL). If we are mixing it up (means, SETLL , CHAIN as well embedded) then we need to declare in F spec.
@manojgupta7478
@manojgupta7478 6 жыл бұрын
Hi Yusuf, Thanks for your vedios, Is there any way I could practice it. Like some server access on free or rental?
@yusy4code
@yusy4code 6 жыл бұрын
There is a option of getting 3 month subscription for 25$ from TexAS400 texas400.com/as400account.html
@kishorgopal7113
@kishorgopal7113 7 жыл бұрын
please help to understand the concept of error handling in RPGLE program
@chauhanrahul155
@chauhanrahul155 5 жыл бұрын
How to learn sqlrpgle?Do we have to see videos of SQL?
@yusy4code
@yusy4code 5 жыл бұрын
You need to learn by practicing more. I do not have dedicated series of videos for SQLRPGLE. Follow RPGPGM.com for interesting SQLRPGLE stuffs.
@DattaPadal
@DattaPadal 6 жыл бұрын
Do we really need to define the file we are using for SQL statements in F spec? ( like STUDPF in the example) ?
@yusy4code
@yusy4code 6 жыл бұрын
Actually Not (If we are going to use only Embedded SQL). If we are mixing it up (means, SETLL , CHAIN as well embedded) then we need to declare in F spec.
@rameshreddy8137
@rameshreddy8137 6 жыл бұрын
Nice Explanation and could you tell me what are the advantages over rpgle vs sqlrpgle
@yusy4code
@yusy4code 6 жыл бұрын
1. Working with Groups of Data: SQL is terrific at selecting and manipulating groups of data. If you want to update/delete all the records in a file matching a certain criteria, use SQL. SQL can change or delete a group of records in a single statement, whereas native I/O would require you to loop through a file and issue individual update or delete statements. 2. Massaging Columns: SQL has a slew of columnar functions designed to tally, total, summarize, manipulate, and calculate columns of data. Many program features such as substringing, averaging, and math functions can be performed during the record selection phase. Columns can even be returned that don’t exist in the file, such as counts, calculations, literals, and dates. 3. Aggregate Data. SQL lets you easily aggregate columns in like rows: For instance, if you wanted to find a list of all the different zip codes in a mailing address file and count how many addresses were in each zip code, SQL can easily accomplish this in a single statement. In native I/O you would have to loop through a file and increment counter fields or use arrays and/or multiple-occurrence data structures to aggregate like data. Combine this capability with 1 and 2 above and SQL absolutely shines. Full article : www.itjungle.com/2005/08/10/fhg081005-story01/
@rameshreddy8137
@rameshreddy8137 6 жыл бұрын
Thank You Yusuf, Really Appreciate your Help
@eugepetters2003
@eugepetters2003 7 жыл бұрын
Mohammed! you have an video tutorial for configure an emulator to do some practice? Thanks!
@yusy4code
@yusy4code 7 жыл бұрын
The steps needed to configure emulator after installing is given in the description of another video here kzbin.info/www/bejne/Y4a4pJ9jbNJ4ra8
@ScottThompson-uz9dt
@ScottThompson-uz9dt 3 ай бұрын
Where is the dds for the StudPF physical file. You can't do anything without that.
@avijitsharma5050
@avijitsharma5050 6 жыл бұрын
So i guess getting data using cursor is faster rathen than getting data using SETLL + READE ? just wanted to know which one is faster
@yusy4code
@yusy4code 6 жыл бұрын
Actually it depends, if we have multiple random fetches then SETLL & READE / CHAIN is better choice. But we have a bulk update or delete based on a specifi condition then embedded SQL is better. Read it here when to use SQL in more detail: www.itjungle.com/2005/08/10/fhg081005-story01/
@rameshreddy8137
@rameshreddy8137 6 жыл бұрын
Nice Explanation Great Efforts, How can we define SQL table in F spec what is the diff btw PF and SQL table
@yusy4code
@yusy4code 6 жыл бұрын
From my understanding both are same. SQL table equivalent is PF and SQL View equivalent is LF.
@rameshreddy8137
@rameshreddy8137 6 жыл бұрын
Thanks for your Reply, can we declare sql table in F spec can we read the record format how we know the recformat there is no rec format in SQL right
@bhanuteja6261
@bhanuteja6261 6 жыл бұрын
hey Yusuf, i am getting SQL0312 error ''SQL0312 30 11 Position 46 Variable DPT not defined or not usable. ''
@yusy4code
@yusy4code 6 жыл бұрын
If your code is in pub400 then give me the source details so that i can have a look.
@bhanuteja6261
@bhanuteja6261 6 жыл бұрын
Ya sure... My code is there in user01251/teja(RPGLE007)
@yusy4code
@yusy4code 6 жыл бұрын
Variable "Name" is not declared as stand alone variable DName Like(ENAME) change the above line to DName S Like(ENAME)
@pallenaresh7254
@pallenaresh7254 Жыл бұрын
Hi Sir Are you teaching in offline Please let me know we will join Please sir help us
@tanutyagi2550
@tanutyagi2550 4 жыл бұрын
Can someone please suggest how to declare a file like STUDPF above?
@bhanuteja6261
@bhanuteja6261 6 жыл бұрын
I am trying it in PUB400.com
@karthikmuthamsetti7161
@karthikmuthamsetti7161 5 жыл бұрын
As this is about basics of SQLRPGLE, you should have explained how the SQLRPGLE syntax looks like in the program. Also, you kept on writing the program and showed the result. But you didn't explain what each line specifies and what does it serves. For ex, no explanation for "Commit = *NONE " line. The beginners expect explanation and syntax.
@ravalikakumanu5960
@ravalikakumanu5960 2 жыл бұрын
Yes
@yogmahirazz
@yogmahirazz 6 жыл бұрын
Hi yusuf when I am using file field studdpt using like keyword I am getting SQL0312 Position 46 Variable studdpt1 not defined or not usable....why sqlrpgle not able to take definition from file itself because it already declared 462823/USER0444/QPAD060311 from pub400 user0444
@yusy4code
@yusy4code 6 жыл бұрын
I have just checked your session and i hope you have fixed the issue. If you still have issue let me know the program name so i will check and let u know.
@yogmahirazz
@yogmahirazz 6 жыл бұрын
I created field as standalone that's why it's working...but using like keyword to get filed definition from file it was not working you can chk in user04441/mypractice/PGMSQLRPG4
@yusy4code
@yusy4code 6 жыл бұрын
ok here is the error: DEID LIKE(EMPID) if we define with blank declaration type then it will think it is inside Data Structure. But for us it is a stand alone variable. but the definition is like(empid) so change your code like below DEID S LIKE(EMPID)
@yogmahirazz
@yogmahirazz 6 жыл бұрын
It's working thanks... :)
@phpBasics
@phpBasics 6 жыл бұрын
Apparently, the people making these types of videos can't afford an audio interface
@yusy4code
@yusy4code 6 жыл бұрын
Thanks for the feedback. I will try to improve the audio interface.
Production support tips in IBM i server
19:39
Yusy4Code
Рет қаралды 25 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
[001] IBM i (AS/400): Databases all the way down...
8:03
Mainframes & More with Matthew
Рет қаралды 19 М.
STRSQL in IBM i - An overview and tips&tricks for beginners
10:43
Create simple Game using DSPF & DS in IBM i - for Beginners
25:13
Understanding Activation Groups in IBM I RPGLE | yusy4code
16:04
Basics of OVRDBF, OPNQRYF & Level check error in RPGLE
22:46
Yusy4Code
Рет қаралды 30 М.
What is Activation group in as400
1:41:18
AS400 and SQL Tricks
Рет қаралды 2,5 М.
Subfile Design through SDA
23:49
Sanjeev Choubey
Рет қаралды 9 М.
Introduction to CL programming - IBM i ( AS400 ) for Beginners
25:51
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН