Professional Documents
Culture Documents
HFELICO
H specification
Also known as control specification
This is not a mandatory specification.
Program has only one H specification level.
If in a library there are 10 to 15 prog and we want the common H spec for all them then we
need to defined a common DATA AREA RPG H spec this will be in the common lib list where
all the program are executed.
The length of data area is 80 char and is position specific.
Comments are given either before position 6th or after position 80 and incase * is given at
position 7th then it is a comments.
EX 1------------------6-----------15---------------80
H
1
(This sets that debug & dump option is set to yes.)
H spec is also used for DATE format
Ex 1------------6-----------------19-------H
blank (the date format used is MMDDYY
If M is specified used as MMDDYY
If D specify DDMMYY
If Y specified YYMMDD
At 20th position---if its blank then it check for position 21
At position 21st position if any character is given it takes it as a separator.
If I is given at the position then it takes a period (.) as a separator.
Currency and decimal are also given at 21st position.
Position 75--------80 if we specify something at this position (ABCDE) then it overwrites the
program name given at CRTPGM.
And in case its blank the same name of the program given at CRTPGM is taken as it is.
If in a program pgm1 a file pf1 is available as soon as we use the pgm leave the option blank at
position 71-72.
EXPLICITY OPENthis statement needs to be written in the program. Similarly CLOSE
In case close is not specified then when the program ends the file is also closed.
Ex filePF1
Call CL OVRDBF PF1 PF2
READ PF1
DATA PF1
This is in case of blank as the ovrdbf is executed & then the data of PF2 is available.
FSPEC (keywords)
At position 53 if K is given for execution added line.
Then we can add some keywords
COMMIT position 5459 COMIT
ROLLBACK position 54-59 ROLBK
2.IGNORE position 5459 this is when it is a multi format file (i.e LF ,R1,R2,R3))
1------19----28-----53-----------54----59---------rec1
K
IGNORE
REC1 RECORD FORMAT NAME
3.INFDS(exception/error) info
Position 53K position 6067 DS name
02/06/09
4. INFSR: error subroutine
ex subr1,subr2,subr3 using all off them instead of that we can create subroutine then call this subr at
different steps.
Control file exceptional error
1-----------53------------54-59---------------60-67------K
INFSR
name of subroutine
5. RECNO: Record number
53--------54-59----60-67
K
RECNO field name
Used for all operationread, write, update, cursor set.
This is used only when the position 31st is blank i.e there is no key.
6. RENAME used position 5459
here we can rename record format
At position 1928 old position and 60-67 new format
The old record format is not used.
If 2 different files has same record format name then we need to change one of them else we will get
error while compiling.
7. SFILE used for sub file type of display file
1---------------5459-----53--------60-67--------------- 47------52
SFILE K
subfile rec format
name of field (RRN) of the sub file
Position 1926 blank and file name (this file is one which contain all data of the array/table but in this
case this file should be defined in F specification this file should be output file/combined.
The file name mentioned in position 1118 and 19---26 can be same but the file type should bu
combined i.e display file.
Position 2732 array/table name
Position 3335 blank (run time array) and compile or pre rum time we have entries per element value
in position 3335 can be form 1999
If we have taken 10 element array and given element size 3 for each then 3 element comes in each
row.
R1 3 elements
R2 3 elements
R3 3 elements
If we have given 4 element then it will not taken and show some error.
Position 3639 maximum no. of elements i.e 1-999
Position 40-42 length of element
Position 43 data type (P, B,blank for character)
Position 44 for decimal position (in case of packed decimal)
45blank for no sequence A for ascending and D for descending.
L Specification (Line level specification)
Indicators:0199---general indicator
l1l9 or LRcontrol level indicator
H1H9 halt indicator
U1U8-External indicator
RT-return indicator
At position 21 blank
2. Field Description Entry:
At position 6 I
7---20 blank
2130 old name
3152 blank
5358 new name
6162 M1 M9 matching field indicator
6570 halt, general, external, return indicators
5960 indicator
Data structure
1.
2.
3.
4.
IN the program described normal ds all the information about the ds is stored within
the program.
External desc ds all the information present in some file.
AMANLIB/AMANSRC
TRYARR
I Specification
Named constants are the values that have same value through out the program.
At position 6 I
720 blank
21---42 value (constant)
43 cconstant, Bincase the value is moving on towards line as the space is not enough on the
given line
5358 name of constant
Ex 6
21----------42 43 53----58
I
ABCDE C FLD1
Q create an initial data structure & dont specify its name and see the result.
F1 123456
F1 1,2,3,4,5,6 then we can take a data structure of F2
F1=1, F2=, ,F3=2, F4=, ,
C Specification
All data operation are performed at this level.
It is divided into three parts:
Position 7-17conditioning indicators
Position 18-53what kind of calculation need to be done on the given data.
5459resulting indicators.
At position 6 C
78 control level (AN & OR this is for indicators that we will defined)
917 general indicators (0199)
123
18-27 factor1 (this could be field, actual data & keyword)
2832 opcode
3342 factor2
4348 result field
4951 length of the result field (numeric 130 and char 1256)
blank it means result field is already defined in the program.
52decimal position of result field min 0 or max-9
53 operational extender
H-half adjust only for numeric
N-record locking
P-padding right side
Ex- H 1.234 used as +5 or -5
It leaves the last position on the right 1.28
N when the opcode is working then the record gets locked. But if not use N does not allow record
locked.
54---59
5455 HI high
5657 low
5859 equal
6074 blank
7580 comments
Introduction
Business overview
System walkthrough
Major functionality
Transaction
Charge backs
Letter generation
Interfaces
Interfaces job
Connect direct log
Major file
System access
Library structure
Archive job
XHIMANSHU/RPGPRAC
FRPG1
FQSYSPRT O F
132
OF
EXFMT TO DISPLAY
To work in synon check two library Y1SY and Y2SY should be listed in lib list.
To create travel services order manually
YSTRY2 *S to start synon modal
DSPFD-- file level information---file type attributes member type attributes file, File is currently
journaled access path, (keyed or arable) record format attributes
DSPFFD -- field level information in the file
DSPDBR--to find out logical file on perticuler ph file
WRKOBJthat is used to show or check object authority and the command worked in back ground is
DSPOBJAUT. Or display object discretion
DSPMSG QSYSOPR used to check operator queue
DSPPGMREF
DSPUSRPRF
DSPUSRPRF USRPRF(*ALL) TYPE(*BASIC) OUTPUT(*OUTFILE) OUTFILE(XDILIPTS/...
Clear library
CPYFRMIMPF
CPYTOIMPF
CRYTOSTMF
CRTDIR
CRTJRN
Create journal
CRTLIB
Create library
CRTPAGSEG
CRTOVL
CRTSRCPF
CVTPCDPAGS
CVTOVLPFM
CVTPAGSPFM
CVTPFMPAGS
DLCOBJ
De-allocate object
DLTJRN
Delete journal
DLTLIB
Delete library
DLTLICPGM
DSPDBF
DSPDBR LIB/FILE
DSPFD
DSPFFD
DSPJRN
Display journal
DSPLIB
DSPLIBD
DSPLICKEY
DSPMSG
DSPMSGD
DSPPFM
DSPPGMREF
DSPRCDLCK
DSPUSRPRF
ENDDBG
End Debug
ENDJRN
End journal
EDTLIBL
OUTQ
OUTQ(PRINTER)
PRTRNG
PRTPFDDTA
RMVDIR
RMVBKP
RMVLICKEY
RMVLNK
RMVJRNCHG
RSTLICPGM
RTVJOBA
RUNQRY
QRYFILE(LIB/FILE)
SAVLIB
Save library
SAVLICPGM
SAVRSTLIB
SNDMSG
SNDPGMMSG
STRAFPU
STRDBG
Start Debug
STRDBMON
STRDBU
STRDFU
STRJRN
Start journal
STROVLU
STRPDM
Start PDM
STRPFU
STRSQL
WRKACTJOB
WRKJOBSCDE
WRKLICINF
WRKOBJ
WRKOUTQ
WRKMSGF QCPFMSG
WRKNETF
WRKOBJLCK
WRKSBMJOB *JOB
WRKSPLF
WRKSYSACT
WRKSYSSTS
WRKUSRJOB
WRKUSRPRF