الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Rpgle/as400

بدأه basel_areg في 18 مايو 2009 · 2 رد · 3,929 مشاهدة · في قسم التقنيات الجديدة (لإفتتاح أقسام خاصة بها لاحقا)
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

أهلاً ومرحباً ..

معكم مبرمج متخصص ومحب ل لغة RPGLE التي تستخدم في بيئة AS400 من IBM وهذه الللغة مستخدمة في البنوك ومصر بشكل كبير

انا على استعداد على اعطاء دروس ومناقشة اي موضوع

الرجاء من المهتمين التفاعل حتى نقدر على فتج قسم خاص بنا

وك بداية شرح مبدئي عن اللغة : -

Specifications in RPGLE

The first thing you should know in RPG IV is that RPG IV is a positional language. This means that we are allowed to write code at specific columns only. In RPGLE every line of code begins with the declaration of specifications. Actually in RPG IV all types of statements have been categorized. The specification tells the compiler which category the coming statement falls into. That’s the RPGLE compiler interprets a specific line of code on the basis of the specification. In RPG IV we have the following main specifications. All these specifications begin on the 6th column.

There are the following specifications in RPG IV (ILE RPG) .

The H Specification

This specification is used to give the instructions to compiler. For example the data format to be used within the program. Whether source debugging is allowed or not etc. Now-a-days most of these compiler instructions are given while compiling the program only. However, the most frequently used compiler instruction in RPGLE is NOMAIN.

The F Specification

This specification is also known as the File specification. Here we declare all the files which we will be using in the program. The files might be any of the physical file, logical file, display file or the printer file. Message files are not declared in the F specification.

The D Specification

We declare all the variables to be used in the program in the D specs. Though we can also declare the variables on the ad-hoc basis, this is strongly discouraged for it makes the maintenance of huge programs a miserable task.

The I Specification

I specifications are used to rename some fields or record format names. Now a days renaming of record formats is done in F-Specs only. To rename a record format in F-Spec we use the keyword (Rename) as explained in the F Specification section of this tutorial.

The C Specification

This is the most widely used specification. All the calculations take place here. All the file operations, calculations, Calls to other programs, calls to procedures etc. are done in this specification only. A typical C-Specification statement looks as below.

The P Specification

These statements mark the boundary of the Procedure. We will learn more about procedures in the Modules and Procedures and Sub procedures sections. Now that we have had a little idea of an RPGLE specification

we can proceed to our first RPGLE program.

progress.gif
وللتأكد و

وللمزيد من الدروس على الرابط

وشكرا

#2

كيف يمكن عمل بحث داخل الملفات بالستخدام أكثر من برامتر

#3

مشكور اخي على المشاركة

بس سؤالك مش واضح كتير وان شاء الله اقدر افيدك

انت تريد البحث داخل الملف من خلال باراميتر

من خلال عمل برنامج يستقبل الشيء المراء البحث عنه وبرنامج اخر يرسل لة الباراميتير من خلال الشاشة او من خلال لغة التحكم

سيتم تعريف باراميتر مدخل الى البرنامج

الملف :file

البرنامج الاول:

RPGLE

الكود:

FFile IF Disk

C parm TxtSrh

C *Start Setll

C Read File

C If Field1 = TxtSrh

C 'Found' Dsply

C EndIf

C

C Dow not %EOF(FILE)

C If Field1 = TxtSrh

C 'Found' Dsply

C Leave

C EndIf

C

C Read File

C ENDDO

C SetOn LR

البرنامج الثاني:

CLP

CODE:

PGM

CALL PGM1(&Parm)

END:

ENDPGM

C*entry plist

تم تعديل هذه المشاركة بواسطة basel_areg في 27 مايو 2009 في 21:07

مواضيع مشابهة