can you explain the difference between spacea,spaceb,skipa
and skipb.
I'm new to learning about as400 and printer files.
can any one give me an example using source code showing the
difference that occurs between using these 4 keywords.
A-Physical file PF004 source
UNIQUE
R RR
STUNAM 10
ROLLNU 5 0
MARKS 3 0
SEX 6
K ROLLNU
4 records present in PF004 are
STUNAM ROLLNU MARKS SEX
KAVYA 12,344 55
FEMALE
MADHAVAN 14,579 60
MALE
RAMYA 14,785 70
FEMALE
KRISHNAN 14,988 72
MALE
B-Printer File PRINT1 source
A R HEADER
A 10 3'STUNAM'
A 10 20'ROLLNU'
A 10 30'MARKS'
A 10 40'SEX'
A R DETAIL
A SPACEB(1)
A STUNAM 10 3
A ROLLNU 5 0 20
A MARKS 3 0 30
A SEX 6 40
A R FOOTER
A SPACEB(1)
A 20'END OF REPORT'


C-RPG/400 Program PRTTPG source
FPF004 I F E DISK
FPRINT1 O E PRINTER
C WRITE HEADER
C READ PF004
60
C *IN60 DOWEQ *OFF
C WRITE DETAIL
C READ PF004
60
C ENDDO
C WRITE FOOTER
C SETON LR

D-spooled file result set


Display Spooled File
File . . . . . : PRINT1
Page/Line 1/10
Control . . . . .
Columns 1 - 130
Find . . . . . .
*...+....1....+....2....+....3....+....4....+....5....+....
6....+....7....+....8....+....9....+....0....+....1....+....
2....+....3
STUNAM ROLLNU MARKS SEX
KAVYA 12344 055
FEMALE
MADHAVAN 14579 060 MALE
RAMYA 14785 070
FEMALE
KRISHNAN 14988 072
MALE
END OF REPORT
Bottom
F3=Exit F12=Cancel F19=Left F20=Right F24=More keys

I have changed from SPACEB to SPACEA now in my printer file
source
E-Changed PRINT1 Source
A R HEADER
A 10 3'STUNAM'
A 10 20'ROLLNU'
A 10 30'MARKS'
A 10 40'SEX'
A R DETAIL
A SPACEA(1)
A STUNAM 10 3
A ROLLNU 5 0 20
A MARKS 3 0 30
A SEX 6 40
A R FOOTER
A SPACEA(1)
A 20'END OF REPORT'

F-Spooled file Result Set after keyword change

Display Spooled File
File . . . . . : PRINT1
Page/Line 1/10
Control . . . . .
Columns 1 - 130
Find . . . . . .
*...+....1....+....2....+....3....+....4....+....5....+....
6....+....7....+....8....+....9....+....0....+....1....+....
2....+....3
KAVYAM 12344U 055KS FEMALE
MADHAVAN 14579 060 MALE
RAMYA 14785 070 FEMALE
KRISHNAN 14988 072 MALE
END OF REPORT


Bottom
F3=Exit F12=Cancel F19=Left F20=Right F24=More keys
Overprinting not displayed.































No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More IBM AS400 AllOther Interview Questions

distinguish between terminating a program through seton lr and return?

0 Answers   IBM,


what is command in SFTP which is equivalent to SDUP command in FTP?

2 Answers  


what is the difference between normal upddta to pf and updating using dfu program?

0 Answers   IBM,


How can we read file using curser? how to define a curser?

0 Answers  


How do you grant authority?

1 Answers  






can we creat a member logical file

3 Answers  


which are control break logic indicators?

0 Answers   IBM,


Hi,Please give me the the answer for these quesitons? 1.what is IFS and ICF and RAPE amd DISKET fils? explain with example please? 2.What is the difference between POST AND SPACE OPCODES? 3.Can anybody tell me default printerfile command and object type?

0 Answers  


Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)

1 Answers  


Pose, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular name field. How can we do the above using search criteria other than using the if cond?

0 Answers  


Hi,Can any body give the code for the below mentioned quetion.?Im trying to get coding in with easily inderstanding.Plese give me the coding for this? 1.How would you achieve this requirement with out using RPG/RPGLE pgm,but by using only CL?Read a database file and display file contents on the screen when enter key pressed the next record should be displayed on screen.When the last record is reached or when F3 key is pressed the program should exit if the file is empty,a message should be displayed indicate that there are no records to display. Database file Name=EMPDBF Fields in EMPDBF to be displayed on screen Employee Number- EMPNUM(5,0) Employee Name- EMPNAM(30,A) Employee Address-EMP ADDR(50 A)

0 Answers   TCS,


Can anybody please tell me what is difference between SQL (STRSQL ) and WRKQRY .....?

3 Answers  


Categories