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

What is the difference between iter and do? We know both are used to execute set of statements repeatedly, but what is the main difference?

0 Answers  


How to add 99 menu (page down) option in menu creation..

0 Answers  


The content of Physical file is as below: hfcftp wruquief SENDPASV 0 CDUP ASCII GET 01100901.CSV ramndk/ECP505.EC0110090 (REPLACE QUIT Thw above commands will get executed when we call STRTCPFTP from CL program.... Now if I want to use SFTP what can be the solution? plz reply in detail....Thank you for ny help...

1 Answers  


what are indicators?

0 Answers   IBM,


what is procedure prototype and procedure interface.

0 Answers   IBM,






how would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed?

1 Answers   IBM,


what is a composite key?

1 Answers   IBM,


What is the difference between a Physical File & a Logical?

28 Answers   Accenture, ACS, IBM,


how will you find a string using pdm?

0 Answers   IBM,


Hi.can any body give me the code for this quesiton please.Because i dont have to try to enter the code in to the AS/400 server.Please can anybody give the answer for this question with complete code? A smple RPLE pgm which accepts the starting number and ending number as parameter.It then has to count all the odd numbers b/w the accepted range of numbers and display the results/ Ex:if the input parameters are 11 and 30 the result should be 10(11,13,15,17,19,21,23,25,27,29) Please explain and give me the complete code?

2 Answers   Bally Technologies,


What are the two types of read performed on data queues?

1 Answers  


How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to dynamically expand?

1 Answers  


Categories