Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ISeriesAs400Bloggertime:SubProcedures
0
More NextBlog
CreateBlog SignIn
ISeriesAs400Bloggertime
ShowingpostswithlabelSubProcedures. Showallposts
TUESDAY,28MAY2013
BLOGARCHIVE
LABELS
2013(64)
AS400 (14)
June(18)
PROCEDURECALLINGTWOSUBPROCEDURES
May(46)
MESSAGE
Subfiles
Checking
Record
Locks
While
Updating
PFin
Subfile...
As400 Interview
Questions (5) CL
Programs
(8)
RPGLE
Programs
(17) Sub file
(9)
Sub Procedures
(3)
MESSAGE
Subfiles
PRA1/QRPGLESRC
TWOSUBPROC
0000.01DAS30
0000.02DBS30
0000.03DSS30
0000.04DGS30
0000.05DSUBPR1PR30
0000.06DA30
0000.07DB30
0000.08Dres1S30
0000.09DSUBPR2PR60
0000.10DS30
0000.11DG30
0000.12Dres2s60
0000.14CEVALA=7
0000.15CEVALB=4
0000.16CEVALres1=SUBPR1(A:B)
0000.17Cres1DSPLY
0000.18CEVALG=2
0000.19CEVALS=res1
0000.20CEVALres2=SUBPR2(S:G)
0000.21Cres2DSPLY
0000.22ceval*inlr=*on
0000.23CRETURN
0000.24PSUBPR2B
0000.25DSUBPR2PI60
0000.26DS30
0000.27DG30
0000.28DZS60
0000.29CEVALZ=S*G
0000.30CRETURNZ
Subfile
Validations
Subfile
Program
Procedure
inRPG
DisplayFile
DSPF
Executed
FromA
Menu,This
WillStart
System
Suppl...
CopySource
FilesUsed
In
RCVNSF/S
NDNSFTo
PCFile...
Reorganize
AllFilesIn
Selected
Library
Find(Or
CREATE)
ASource
CodeFor
An
OBJECT
ConnectTo
ATarget
System
Where
YouCan
SignOn
A...
0000.31PSUBPR2E
Lookahead
0001.00PSUBPR1B
ToUNLOAD
ATAPE
0002.00DSUBPR1PI30
0002.01DA30
0002.02DB30
0005.00DCS30
0006.00CEVALC=A+B
0007.00CRETURNC
0008.00PSUBPR1E
http://as400error.blogspot.in/search/label/Sub%20Procedures
Hist
programsets
the
ATTENTIO
NKeyTo
CallPre
Defined...
ToRetrieve
ALL
1/4
3/26/2015
ISeriesAs400Bloggertime:SubProcedures
Librariesin
QSYSto
OUTFILE
andD...
outputis:
Integrated
File
System
DSPLY11
DSPLY22
Postedbysivarazzmat10:28
Nocomments:
Labels:SubProcedures
source
physical
filethen
uses
CPYTOST
MF
QuickWay
To
Receive
PFDATA
From
PRODUCT
IONTo
TE...
SUB PROCEDURE
SUBPROCEDUREWHENRETURNINGANYVALUE(sincethissubprocedureis
returningavaluesoprocedureinterfaceshouldbeused,callp
shouldnotbeused,andthelengthofthesubprocedureshouldbe
defined)
PRA1/QRPGLESRC
SUBPROC
0001.00das30
0001.01dbs3
0
0002.00Dsubpr1pr12
0
0003.00Da30
0004.00Db3
0
0005.00Dcs12
0
0007.00Ceval
a=10
0008.00Ceval
b=20
0008.03ceval
c=subpr1(a:b)
0010.00cc
dsply
0011.00ceval
*inlr=*on
0012.00c
return
0013.00
0014.00
0015.00psubpr1
b
0016.00dsubpr1pi12
0
0017.00da30
0018.00db30
0019.00dxs120
http://as400error.blogspot.in/search/label/Sub%20Procedures
QuickWay
To
Receive
PROGRA
M
SOURCES
From
PRODUCT
I...
QuickWay
To
Receive
DATA
From
PRODUCT
IONTo
TEST...
Program
writesto
source
physical
filethen
usesC...
Program
writesto
source
physical
filethen
usesC...
CPYTOSTMF
example
reading
XMLfile
CPYTOSTMF
example
reading
XMLfile
CPYTOSTMF
example
reading
XMLfile
Useapito
get
spooled
file
information
Deletewith
RPG
%Scanand
replace
example
Sixdecimal
date*MDY
converted
to*ISO
CPYTOSTMF
example
reading
XMLfile
2/4
3/26/2015
ISeriesAs400Bloggertime:SubProcedures
0020.00cevalx=a+b
0021.00creturnx
0022.00psubpr1e
CPYTOSTMF
example
reading
XMLfile
Program
writesto
source
physical
filethen
usesC...
outputis:
DSPLY30
Program
writesto
source
physical
filethen
usesC...
Howtoseeoutput:
1)HereinsubproceduresweshouldnotcompiledirectlyImean14optionshouldnotbeused.
Firstusecrtrpgmodthenpress<f4>andentermodulenameifuwritecrtrpgmodandpressenterthendefault
modulewillbecreatedinqgpllibrarywiththemodulenameasproof.
2)thencrtpgm<f4>andwritetheprogramsname(anyname).
3)toseeoutputtypeonthecommandlineascall<programname>.[herecallproc1].
Postedbysivarazzmat10:26
Nocomments:
Labels:SubProcedures
positionfile
toproduct
readequal
tototal
sales...
chainingto
logicalfile
to
write/updat
edata
loading
subfileone
pageata
time
PROCEDUR
E
CALLING
TWO
SUBPROC
EDURES
subprocedures
subprocedures
Importantpoints:
SUB
PROCEDU
RESUB
PROCEDU
REWHEN
RETURNI
NGANY
V...
1)Inthecallingprocedure,wehavetodeclareprototypeofthereturningvalue.
subprocedur
es
2)iftheprocedureisnotreturninganyvalue(void)thencallpshouldbeused.,andimportantly
lengthofthesubprocedureneednotbedefinediftheprocedureisnotreturninganyvalue.
DATE&
TIME
OTHER
IMPORTA
NTNOTES
Ex:callp(opcode)subpr1parm(ab)
3)Procedureinterfaceincludesthereturnvalue,andtheparameterslike*entryplist.Itisreceivingvaluesfrom
outsideprocedure.
TYPE1:MAINPROCEDURECALLINGSUBPROCEDURE
SUBPROCEDUREWHENNOTRETURNINGANYVALUE
(sincenotreturninganyvaluecallpshouldbeused&&length
ofsubprocedureneednotbespecified).
PRA1/QRPGLESRC
MODULE3
0001.00DSUBPR1PR
0002.00C'RAVI'DSPLY
0003.00Ccallpsubpr1
0004.00CEVAL*INLR=*ON
0005.00CRETURN
0006.00
0007.00PSUBPR1B
0008.00DSUBPR1PI
0009.00C'KUMAR'DSPLY
0010.00PSUBPR1E
USING
%TIME
and
%DATE
BUILTIN
FUNCTIO
N
RPG/RPGLE
400
INTERVIE
W
QUESTIO
NS&
ANSWERS
Grab
the
Opportunit
y...
DB2400
Interview
Questions
&Answers
HistoryOf
As400
AS400Bank
NOTE:
http://as400error.blogspot.in/search/label/Sub%20Procedures
3/4
3/26/2015
ISeriesAs400Bloggertime:SubProcedures
Therznopspecbutsubprocedureshouldbeinformedassubpr1b(whilebeginning)
abdsubpr1e(whileending)sofirstinsertImeanwriteIandpressenter,thenwritepincolumn1
andpress<f4>thenucanviewlikethis
ProcedureNameBegin/End
subpr1e
outputis:
DSPLYRAVI
DSPLYKUMAR
HOWTOSEEOUTPUT:
1)HereinsubproceduresweshouldnotcompiledirectlyImean14optionshouldnotbeused.
Firstusecrtrpgmodthenpress<f4>andentermodulenameifuwritecrtrpgmodandpressenterthendefault
modulewillbecreatedinqgpllibrarywiththemodulenameasproof.
2)thencrtpgm<f4>andwritetheprogramsname(anyname).
3)toseeoutputtypeonthecommandlineascall<programname>.[herecallmodule3].
Postedbysivarazzmat10:22
Nocomments:
Labels:SubProcedures
Home
OlderPosts
Subscribeto:Posts(Atom)
PictureWindowtemplate.PoweredbyBlogger.
http://as400error.blogspot.in/search/label/Sub%20Procedures
4/4