Вы находитесь на странице: 1из 7

Field symbols & String Operations:

Field symbols are similar to pointers in C language, feld symbols dosen`t have any
memory instead they will be pointing to a memory location.
he concept o! feld symbols is very important in order to increase the per!ormance o!
S"# applications, but unethical use o! feld$symbols leads to application issues.
Field symbol name should always be within %&, e'ample:%FS()"*"&.
Synta' !or declaring a feld symbol.
F+,-.$S/)0O-S : %F+,-.(S/)0O-& /#, )"*"$)"1*. 2here )"*"$)"1* is a variable
type
F+,-.$S/)0O-S : %F+,-.(S/)0O-& /#, )"*". 2here )"*" is a structure
F+,-.$S/)0O-S : %F+,-.(S/)0O-& /#, *,F O ."" . 2here ."" is a re!erence type
"SS+31+13 and "SS+31 are the 4eywords which are used to assign a value to the feld
symbol.
,'ample o! using feld symbol as wor4 area
+n the below e'ample we are going to use feld symbol as wor4 area.
*,#O* 5S"#1(F+,-.S/)0O-S.
."" : +()"*" /#, "0-, OF )"*".
."" : 6"()"*" /#, )"*".
F+,-.$S/)0O-S : %FS()"*"& /#, )"*".
S,-,C 7 F*O) )"*"
+1O "0-, +()"*" 8# O 9: *O6S.
-OO# " +()"*" "SS+31+13 %FS()"*"&.
+F %FS()"*"& +S "SS+31,..
6*+, :; %FS()"*"&$)"1*, %FS()"*"&$)"*, %FS()"*"&$),+1S.
,1.+F.
,1.-OO#.
Chec4 weather the feld symbol is assigned or not be!ore processing feld symbol, it is
very important to check feld symbol, if it is not assigned it will get a run-time
error, use the blow synta' to chec4 feld symbol assignment.
+F %FS()"*"& +S "SS+31,..
77process feld symbol
,1.+F.
+ncrease per!ormance using feld symbols in S"# "0"#
+ belive there are always per!ormance di<erences between re!erence variables=wor4
area> and memory pointing=feld symbols>, here + wants to add some proo! !or that.
0elow you will fnd two programs one with wor4 area and another one with feld
symbols, e'ecute them and see time di<erence at the end o! the program= will display
at the bottom o! output>, you will fnd di<erence.
program?
*,#O* 5S"#1(F+,-.S/)0O-S?.
."" : +()"*" /#, "0-, OF )"*". 2internal table
F+,-.$S/)0O-S : %FS()"*"& /#, )"*". 2feld symbols
."" : -@(+),(S"* /#, +),S")#-. 2time at start o! loop
."" : -@(+),(,1. /#, +),S")#-. 2time at the end o! loop
."" -@(+),("A,1 /#, # .,C+)"-S B. 2time di<erence
S,-,C 7 F*O) )"*" 2select data !rom )"*"
+1O "0-, +()"*" 8# O C:::: *O6S.
3, +), S")# F+,-. -@(+),(S"*. 2get time at start o! loop
-OO# " +()"*" "SS+31+13 %FS()"*"&. 2loop start
6*+, :; %FS()"*"&$)"1*, %FS()"*"&$)"*, %FS()"*"&$),+1S.
,1.-OO#.
3, +), S")# F+,-. -@(+),(,1.. 2get time at the end o! loop
-@(+),("A,1 D -@(+),(,1. $ -@(+),(S"*. 2time ta4en
6*+,:; Eime ta4en: E, -@(+),("A,1. 2display time ta4en
#rogramC
*,#O* 5S"#1(F+,-.S/)0O-SC.
."" : +()"*" /#, "0-, OF )"*". 2internal table
."" : 6"()"*" /#, )"*". 2wor4 area
."" : -@(+),(S"* /#, +),S")#-. 2time at start o! loop
."" : -@(+),(,1. /#, +),S")#-. 2time at the end o! loop
."" -@(+),("A,1 /#, # .,C+)"-S B. 2time di<erence
S,-,C 7 F*O) )"*" 2select data !rom )"*"
+1O "0-, +()"*" 8# O C:::: *O6S.
3, +), S")# F+,-. -@(+),(S"*. 2get time at start o! loop
-OO# " +()"*" +1O 6"()"*".
6*+, :; 6"()"*"$)"1*, 6"()"*"$)"*, 6"()"*"$),+1S.
,1.-OO#.
3, +), S")# F+,-. -@(+),(,1.. 2get time at the end o! loop
-@(+),("A,1 D -@(+),(,1. $ -@(+),(S"*. 2time ta4en
6*+,:; Eime ta4en: E, -@(+),("A,1. 2display time ta4en
See the time ta4e to process loop in both programs.
F $
SPLI is a 4ey word which is used to cut a string into pieces at a specifed value.
Aeyword synta' isS#-+ " EE +1O .
,'ample o! using S#-+ in S"# "0"#
*,#O* 5S"#1(S*+13.
."" : -@(S*+13 /#, S*+13 . 2decleration !or main string
."" : -@(S*+13? /#, S*+13, 2decleration !or splitting string into
-@(S*+13C /#, S*+13, 2decleration !or splitting string into
-@(S*+13G /#, S*+13, 2decleration !or splitting string into
-@(S*+13H /#, S*+13. 2decleration !or splitting string into
-@(S*+13 D ES#-+ ), " S#"C,E. 2main string value
S#-+ -@(S*+13 " E E +1O -@(S*+13? -@(S*+13C -@(S*+13G -@(S*+13H. 2split
the main string into specifed felds at space
6*+, :; -@(S*+13?. 2print splitted felds
6*+, :; -@(S*+13C.
6*+, :; -@(S*+13G.
6*+, :; -@(S*+13H.
,'ample o! using S#-+ into internal table
+nstead o! splitting the data into individual felds we can split data into an internal table.
*,#O* 5S"#1(S*+13.
."" : -@(S*+13 /#, S*+13 .
/#,S: 0,3+1 OF /(S*+13,
S*=C9> /#, C,
,1. OF /(S*+13.
."" +(S*+13 /#, "0-, OF /(S*+13.
."" 6"(S*+13 /#, /(S*+13 .
-@(S*+13 D ES#-+ ), " S#"C,E.
S#-+ -@(S*+13 " E E +1O "0-, +(S*+13 .
-OO# " +(S*+13 +1O 6"(S*+13.
6*+, :; 6"(S*+13$S*.
,1.-OO#.
CO1C",1", is a string !unction which is used to add di<erent variables into a single
string variable.
Synta' : CO1C",1", %S*+13?& %S*+13C& %S*+13G&... +1O %S*+13&.
,'ample o! 8sing CO1C",1",
*,#O* 5S"#1(CO1C",1",.
."" : S*? /#, S*+13.
."" : S*C /#, S*+13.
."" : S*G /#, S*+13.
."" : S*+13 /#, S*+13.
S*? D E"E.
S*C D E0E.
S*G D ECE.
CO1C",1", S*? S*C S*G +1O S*+13. 2Concatenate into string
6*+, :; S*+13 .
7he out put will be E"0CE
CO1C",1", with saperated by
*,#O* 5S"#1(CO1C",1",.
."" : S*? /#, S*+13.
."" : S*C /#, S*+13.
."" : S*G /#, S*+13.
."" : S*+13 /#, S*+13.
S*? D EI+S +SE.
S*C D E,J")#-, OFE.
S*G D ECO1C",1",E.
CO1C",1", S*? S*C S*G +1O S*+13 S,#"*",. 0/ E E. 2Concatenate into string
separated by space
6*+, :; S*+13 .
7he out put will be EI+S +S ,J")#-, OF CO1C",1",E
F $
*"1S-", is a string !unction which is used to change the case o! a string i:e !rom
lower case to upper case and upper case to lower.
*"1S-", %S*+13& O %-O6,* C"S,;8##,* C"S,&.
,'ample o! 8sing *"1S-",
*,#O* 5S"#1(*"1S-",
.
."" : -@(S*+13 /#, S*+13.
-@(S*+13 D Esmall to upper caseE.
*"1S-", -@(S*+13 O 8##,* C"S,.
6*+, : ; -@(S*+13.
F $
CO1.,1S, is a string !unction;4eyword which is used to remove blan4 spaces in a given
string.
Synta': CO1.,1S, %S*+13&.
,'ample o! using CO1.,1S,
5S"#1(CO1S,1S,.
."" -@(S*+13 /#, S*+13.
-@(S*+13 D EI+S +S S*+13 6+I S#"C,SE.
CO1.,1S, -@(S*+13.
6*+, : -@(S*+13. 2out put will be I+S+SS*+136+IS#"C,S
he 4eyword; string !unction S*-,1 is used to determine the length o! a string in S"#
"0"# programs.
Synta': S*-,1= %S*+13& >.
8sing S*-,1 to fnd a string length
*,#O* 5S"#1(S*-,1.
."" : S*+13 /#, S*+13.
."" -@(-,13I /#, + . 2variable to store length
S*+13 D EI+S +S SO), S*+13E.
-@(-,13I D S*-,1= S*+13 >.
6*+, : -@(-,13I. 2out put will be ?K
"S"#, accelerated S"# implementation methodology is a proven and success!ul
methodology in implementation o! S"# proLects.
Steps and phases involved in "S"# implementation methodology
?. #roLect #reparation
C. 0usiness 0lueprint
G. *ealiMation
H. Final #reparation
9. 3o -ive & Support
#hase?: #roLect #reparation
his is the frst phase on any proLect under "S"# methodology, this will begin building
up a core proLect team to go through whole implementation process.
+n this phase the team goes through initial planning and preparation !or S"# proLect
implementation, this phase includes:
.efning proLect goals and obLectives.
Clari!ying the scope o! implementation.
.efning proLect schedule, budget plan, and implementation seNuence.
,stablishing the proLect organiMation and relevant committees, and assigning
resources.
#haseC: 0usiness blue print
his is the second o! a proLect under "S"# methodology, this is the detailed !ormula o!
the implementation o! the proLect. he main obLective o! this phase is to achieve
common understanding o! how the company intend to run S"# so!tware.
he proLect goals and obLectives will be set in this phase.
his phase also involves man power, training needs etc.
#haseG: *ealiMation
his is the third phase in "S"#, the purpose o! this phase is to implement all the
business process reNuirements based on blue print.
+n this level, the proLect team should have activities as !ollow, unit testO integration testO
*+C,F=*eports, +nter!aces, Conversions, ,nhancements and Forms> developments, data
cleaning, preparation, collection, validation and testingO train the trainer, such as
process owner and super users. he proLect should develop end user training in
accordance with the end user training strategy.
#haseH: Final #reparation
+n the !orth phase in "S"#, Final #reparation, it will complete the fnal preparation which
include testing, end user testing, system management and cut over activities, to fnaliMe
the readiness to go live. +n addition, this step will resolve all critical open issues, on
success!ul completion in the live S"# system.
#hase9: 3o -ive & Support
he purpose o! this phase is to move !rom a proLect$oriented, pre$production
environment=.evelopment environment> to live production operation. he most
important elements include setting up production support, monitoring system
transactions, and optimiMing overall system per!ormance.
he proLect team will integrate new organiMational chart and Lob profle in!ormation
per!ormance management system. +n addition, the help des4=support des4> will support
end user. he important issue a!ter implementation is to review system processes and
continuous improvement which means the core team will design high level structure,
Lob hierarchy, role, responsibilities and per!ormance metrics !or post implementation
support personal.

Вам также может понравиться