User:Heiko: Difference between revisions

From Try-AS/400
Jump to navigation Jump to search
(About to remove extension)
 
(143 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= About =
== About ==
This is [[User:Heiko|Heiko]]s personal page, in which he maybe shares some private information or collects bits for new articles.
This is [[User:Heiko|Heiko]]s personal page, in which he maybe shares some private information or collects bits for new articles.


== Personal information ==
=== Personal Information ===
[[User:Heiko|Heiko]] has been in IT since the 90s, but never worked with an AS/400...until 2019. He'll document his first steps in the hope they will be useful to others.
[[User:Heiko|Heiko]] has been in IT since the 90s, but never worked with an AS/400…until 2019. He'll document his first steps in the hope they will be useful to others.


== Sandbox ==
== Ideas for new articles ==
Screen mit MW-Bordmitteln:
tbd
 
== Articles to maintain ==
* [[:Category:Programming]]
** [[99 Bottles Of Beer (using REXX)]]
** [[Hello World (using C)]]
** [[Hello World (using database, display file and RPG)]]
** [[Create a database and query it using ODBC from a linux machine]] <-- NEEDS A LOT OF WORK IN THE PHP DEPARTMENT!
* [[Editing Source Files using Eclipse and FTP]]
* [[Compile Sources Without Queuing]]
* [[How to solve Variadic Arguments issue (using C)]]
 
== Too many F-Keys to memorize ==
I'm using a small apple keyboard on which the F-keys aren't labeled very well. This helps a lot:


                                  Anmelden           
[[Image:F-Tasten F13-F24 v2 Photo.jpg|666px]]
                                              System  . . . . . :   SLVRLAKE
                                              Subsystem . . . . :  QINTER
                                              Bildschirm  . . . :  QPADEV0004
                Benutzer  . . . . . . . . . . . .           
                Kennwort  . . . . . . . . . . . .
                Programm/Prozedur . . . . . . . .           
                Men}  . . . . . . . . . . . . . .           
                Aktuelle Bibliothek . . . . . . .           
                                        (C) COPYRIGHT IBM CORP. 1980, 2013.


<console>
You can download it here: [[File:F-Tasten F13-F24 v2.pdf]]
Test
</console>


<console>
== Sandbox ==
=== Screen mit MW-Bordmitteln ===


                                   Anmelden             
                                   Anmelden             
Line 63: Line 52:
   
   
                                         (C) COPYRIGHT IBM CORP. 1980, 2013.
                                         (C) COPYRIGHT IBM CORP. 1980, 2013.
</console>
= Ideas for new articles =
== Project Hello World ==
=== Preparations ===
Things you need:
* an AS/400 (obviously :) )
* an working account
* log in
* command prompt
* maybe this for easy reference
** [[Basic Commands]]
** [[How to program an Application]]
=== Creating a physical file to hold the sources ===
Every user has a personal library, like an home in an Linux environment. Since a user can have and use multiple libraries, the current (=default for all operations) is stored in <tt>*CURLIB</tt><ref>https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/rzarl/rzarlcurlib.htm</ref>.
Because the value of <tt>*CURLIB</tt> can be changed by the screen you are currently working in, all following commands will contain my personal library name <tt>HKRETSCHME</tt>. If you are sure <tt>*CURLIB</tt> is set correctly, you can omit the library.
This command creates a physical file named <tt>HELLO01</tt>:
CRTSRCPF FILE(HKRETSCHME/HELLO01) RCDLEN(112) TEXT('Project Hello World')
But I prefer to do this in more steps, which I'd recommend to every beginner (By the way: don't bother using cases, the AS/400 won't either. Using capital commands and names just makes it more readable in this article.):
CRTSRCPF
If you don't give any parameters for this command, you will be asked. This works great for <tt>CRTSRCPF</tt>, but in general, OS/400 will only ask for '''necessary''' arguments. Some commands, like <tt>CHGUSRPRF</tt> will just do nothing.
This always works:<br/>'''''Enter the command you want to execute and then hit <tt>F4</tt>'''''.
[[Image:HelloWorld01CRTSRCPF.png|666px]]
==== A small detour: Physical Files? ====
[[User:Heiko|Heiko]] struggled a lot with this and thinks a small introduction is necessary:
* <tt>Libraries</tt>: Every user has his own personal library, think of it like a Linux home directory. [https://en.wikipedia.org/wiki/AS/400_library Details]
* <tt>Physical Files</tt>: Of course this is no physical file and you can't touch it. And don't think of if (like I as a german<ref>Yes, as a german IT guy you think of "file" as "Datei". But "file" in english can also mean "Akte" or "Karton mit Akten". Sorry for Kauderwelsch.</ref> do) as one file (f.e. <tt>/etc/passwd</tt>), it's more like an collection of informations, like you might know from MacOS resources.
* <tt>Members</tt>: A member is a file in an physical file, like a book in a filing box. Members of a physical file share the given structure of the PF. Record structure, field lengths, etc.
A more visal approach of explaining:<br/>
[[Image:PhysicalFileOrWhat.png|400px]]
The <tt>Library</tt> is the room you keep your <tt>Physical Files</tt> (like filing boxes) in. The <tt>Physical Files</tt> contain <tt>Members</tt> (like books) but must be the same size (okay, a crude explanation for the "must share structure" approach).


* You can have as much rooms, filing boxes and books as you want.
=== Und nun Screen mit Bordmitteln und etwas HTML-Foo ===
* But you can't put rooms in rooms, boxes in boxes or books in books<ref>And as you may have guessed, you can't put rooms in boxes, boxes in books&#x2026;</ref>.
<p style="color:green; background-color:black">
* The AS/400 has no tree-like storage structure, it is just a list (of Libraries) with a limited depth (Physical Files and Members) to unfold.
<tt>
                                  Anmelden                                      <br/>
                                              System  . . . . . :  SLVRLAKE    <br/>
                                              Subsystem . . . . :  QINTER      <br/>
                                              Bildschirm  . . . :  QPADEV0004  <br/>
                                                                                  <br/>
                Benutzer  . . . . . . . . . . . .                                <br/>
                Kennwort  . . . . . . . . . . . .                                 <br/>
                Programm/Prozedur . . . . . . . .                                <br/>
                Men}  . . . . . . . . . . . . . .                                <br/>
                Aktuelle Bibliothek . . . . . . .                                <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                                                                  <br/>
                                        (C) COPYRIGHT IBM CORP. 1980, 2013.       <br/>
</tt>
</p>


=== Creating the database ===
== See also ==
The procedure is as follows:
* [[Basic Commands]]
* create a text file describing the database
* compile it into a database


==== Creating the DDS ====
== Footnotes ==
The textual description of a database is called DDS. You can learn more [https://www.ibm.com/support/pages/data-transfer-creating-physical-file-using-dds here].
 
* Input this to work with our just created Source Physical File:<br/>[[Image:Hello01wrkmbrpdm01.png|400px]]<br/><code>wrkmbrpdm file(hkretschme/hello01)</code>
* Hit <code>F6</code> to create a new member:<br/>[[Image:Hello01wrkmbrpdm01a.png|400px]]
* This will run STRSEU:<br/>(Input member and type)<br/>[[Image:Hello01wrkmbrpdm02.png|400px]]
* Which brings you to SEU:<br/>(Enter text as shown)<br/>[[Image:Hello01wrkmbrpdm03.png|400px]]<br/>Here's what it means:
        ***************** Datenanfang *******************************************************************************************
0001.00      A          R MESSAGES                                                                              191001          means: <code>A</code>dd <code>R</code>ecord named <code>MESSAGES</code>
0002.00      A            TEXT          42A                                                                      191001          means: <code>A</code>dd field named <code>TEXT</code> with <code>42</code> bytes of <code>A</code>scii.
        ******************Datenende *********************************************************************************************
* Enter <tt>Y</tt> (here: <tt>J</tt>) to save the member.<br/>[[Image:Hello01wrkmbrpdm04.png|400px]]<br/>After saving, check the lower lines for messages. If there is a synthax error, return to SEU and check every line.<br/>Hint: Use <tt>F4</tt> for assistance while coding!
 
==== Creating the database physical file ====
* While working with PDM, enter <code>14</code> to compile the database.<br/>[[Image:Hello01wrkmbrpdm05.png|400px]]
* The compiling will be queued&#x2026;<br/>[[Image:Hello01wrkmbrpdm06.png|400px]]
* &#x2026;and you have to check with <code>DSPMSG</code> if it was successful or not<ref>Can anyone tell me how this is done synchronously? Performance isn't an issue any more&#x2026;</ref>
Hint: Checking your messages with DSPMSG only showed me it wouldn't compile. No error or other logging. If you run into trouble, double check your DDS in SEU, using <code>F4</code> on every single line. And remember the AS/400 is picky. Even an empty line is enough cause to abot compilation.
 
 
TODO: --> [[Beginners Project: Hello World (using database and display file)]]
 
= Articles to maintain =
* [[Beginners Project: 99 Bottles Of Beer (using REXX)]]
 
----
* Links
** [[Basic Commands]]
* References:
<references/>
<references/>
[[Category:Basic Knowledge]]

Latest revision as of 16:41, 14 April 2024

About

This is Heikos personal page, in which he maybe shares some private information or collects bits for new articles.

Personal Information

Heiko has been in IT since the 90s, but never worked with an AS/400…until 2019. He'll document his first steps in the hope they will be useful to others.

Ideas for new articles

tbd

Articles to maintain

Too many F-Keys to memorize

I'm using a small apple keyboard on which the F-keys aren't labeled very well. This helps a lot:

F-Tasten F13-F24 v2 Photo.jpg

You can download it here: File:F-Tasten F13-F24 v2.pdf

Sandbox

Screen mit MW-Bordmitteln

                                  Anmelden            
                                              System  . . . . . :   SLVRLAKE
                                              Subsystem . . . . :   QINTER
                                              Bildschirm  . . . :   QPADEV0004

               Benutzer  . . . . . . . . . . . .             
               Kennwort  . . . . . . . . . . . .
               Programm/Prozedur . . . . . . . .             
               Men}  . . . . . . . . . . . . . .             
               Aktuelle Bibliothek . . . . . . .             













                                       (C) COPYRIGHT IBM CORP. 1980, 2013.

Und nun Screen mit Bordmitteln und etwas HTML-Foo

Anmelden
System . . . . . : SLVRLAKE
Subsystem . . . . : QINTER
Bildschirm . . . : QPADEV0004

Benutzer . . . . . . . . . . . .
Kennwort . . . . . . . . . . . .
Programm/Prozedur . . . . . . . .
Men} . . . . . . . . . . . . . .
Aktuelle Bibliothek . . . . . . .













(C) COPYRIGHT IBM CORP. 1980, 2013.

See also

Footnotes