AS400 SDA development Note (1)

SDA is very useful tool to design DDS. I will try to create a DDS screen with this tool. Meanwhile, I will also try to create my first sub file record today. So let's begin.

(Some of my notes are refer to IBM handbook <Application Development ToolSet for AS/400 Screen Design Aid>. Thanks to the author.)

 

1. Create Subfile record and subfile control record

1 Command: STRSDA
2 Choose 1 'Design Screen'
3 Add a DDS record REC01, record type = SFL, Subfile control record = RECCNTL

Please note, the following keyword:

(keyword with *, means this keyword is a must)

*SFLDSP - Display the subfile records. (Must be set 'Y')
SFLDSPCTL - Display the subfile control records
. If yes, the subfile and control record will be displayed.
SFLCLR - Clear the subfile
. Normally, we will set an indicator to SFLCLR, and set an reverse indicator to SFLDSP & SFLDSPCTL.
*SFLSIZE - Define how many records are included in the subfile
*SFLPAGE - Define how many records will be display per page
.
SFLEND - Define the scroll bar or next page indicator
.

2. Design Screen title and column.

After the subfile keyword defined, we will move to the next step - Screen design. So here we are.

2.1 Insert a label text

Locate the cursor you want to insert a label, and type <+'......quote Label........'>, press<Enter> ×2.

+ : It means add a field.

' ' : It means a label quoted will be add to the screen.

2.2 Insert a variable

Locate the cursor you want to insert a variable, and type <+O(3)>, press<Enter>.

O : Variable type. O means displayable chars(none editable).

(3) : Variable length. It means the variable length is 3 chars.

After you press <Enter>, the variable will display 'OOO'.

Move the cursor to '000' and press <F4>. You can define the field name and other keyword in this screen.

When you move the data value to the variable in COBOL / RPG, it will display the data instead of 'OOO'.

2.3 Insert system value

Locate the cursor you want to insert a system variable, and type <+*DATE>, press<Enter>.

*DATE, Display the system date

*TIME, Display system time

*USER, Display the current user

*SYSNAME, Display the system name

2.4 Moving the field.

Quote the field you want to move with <->, and move the cursor to the position you want to place and type<=>. Press <Enter>. The field will be moved.

2.5 Delete the field.

Quote the field you want to delete with <D>, and then press <Enter>

2.6 Copy the field

Quote the field you want to copy with <->, and then move to the target position and type <==>, press <Enter>.

 

原文地址:https://www.cnblogs.com/enixyu/p/2055753.html