Anda di halaman 1dari 11

COMANDOS AS400

EDITAR UM MEMBRO EDTFFILE(LIBRARY/FILE)MBR(MEMBER)


DE UM FILE EDTFFILE(MSA013/ARQPARAM)MBR(INGB0133)

FINALIZAR CICS ENDCICSP552

INICIALIZA CICS CICSP552

EXECUTAR CL SBMJOBCMD(CALLPGM(LIBRARY/PROGRAM)
SBMJOBCMD(CALLPGM(IPRO552/INGB9135))

DELETA LINHAS DO DLTSPLF*SELECT


SPOOL DA LIB

VISUALIZAR JOB WRKSBMJOB

DEBUGAR PROGRAMA APSCADACOMPILAO


CHGPGMPGM(IPRO552/CSBM9086)OPTIMIZE(*NONE)

SELECIONARPONTODEPARADA
STRDBGPGM(IPRO552/CSBM9086)UPDPROD(*YES)

EXECUTARCLDEFORMABATCHSEMPARAMETRO
CALLPGM(IPRO552/CJPA0170AB)

EXECUTARDEFORMABATCHCOMPARAMETRO
CALLPGM(IPRO552/INGB9420)PARM('000000153201411
10X0000000000000000000000000000000000000000000000');

EX:CALLPGM(IPRO552/CPPA9182)PARM('000279400201606
13Y')

SELECIONARPONTODEPARADA,COMCONDIO
BREAK999WHEN(CONDITION)

Ex:BREAK2163WHEN(POLID=000212223)

ENCERRARODEBUG
ENDDBG

APAGAR O CLRPFMFILE(IPRD552/TCRRA)MBR(TCRRA)
CONTEUDO DO
MEMBRO DE UM FILE
COMANDOS AS400
MUDAR PASSWORD CHGPWDMSA013

????? dspusrprfmsa013
DSPUSRPRFMSA013

EXECUTAR UM SCRIPT RUNSQLSTMSRCFILE(MSA013/DBPARMS)SRCMBR(AAAAAAAAAA)


Ex:RUNSQLSTMSRCFILE(MSA013/DBPARMS)SRCMBR(V_INTERRI)

ENTRAR NO CICS STRCICSUSRP552


CICS/400

DSPMSGD Displaysdescriptionofmessages,ieCPFmessages

DSPMSG QSYSOPR Displayjobemexecuo.Utilizadoparainformar


parametroviaconsole.

WRKMSGF QCPFMSG DisplayscontentsofMONMSGfile

WRKUSRPRF - Canworkwithspecifieduser'sprofile

WRKSBMJOB *JOB Displaysmyjobsforthecurrentsession

WRKACTJOB Displaysallactivejobs

WRKUSRJOB Displayslistofmyjobstoworkwith

WRKOBJ Workwithanobject.Use*ALLUSRinqualifiednameto
skipQlibraries

WRKSPLF Displaysspoolfiles

WRKOUTQ DisplaysmembersinspecifiedOUTQ

DISPLIB Displayscontentsofspecifiedlibrary

EDTLIBL Allowsadditionanddeletionoflibrariestoandfrom
list

ADDLIBLE Library Addlibrarytocurrentlist


Name

STRPDM StartPDM
COMANDOS AS400
STRDBG StartDebug

ADDBKP Addabreakpointandvariablestomonitorindebug

RMVBKP Removeabreakpointindebug

ENDDBG EndDebug

STRDBU StartDBU(DatabaseUtility)Lookatandmakechanges
tothedatabase

DBU Qualified Name RunsDBUwithouttheabovecommand.ADDLIBLEDBU41


*LASTbeforeusing

STRDFU StartDFU(DataFileUtility)Manyofthesame
functionsofDBU

DSPFFD Displaysfilefielddescriptions

DSPFD Displaysfiledescriptionforspecifiedfile

DSPPFM Displaysmemberofaphysicalfile

DSPDBF Displayscontentsofdatabasefile.
MustaddTAATOOLtolibrarylistbeforeusingthis
command

DSPPGMREF Displaythefilesusedinaprogramandwhichlibraries
theprogramwascompiledover

PRTRNG Willallowprintingarangeofpagesfromamemberin
thespecifiedOUTQ.
MustaddPRTRNGtolibrarylistbeforeusingthis
command

OUTQ(PRINTER) Markobjectinspoolfilewith2forchange.Typethis
onthecommandline.

WRKJOBSCDE Lookatscheduledjobs

RUNQRY Runqueryonafilewithnoparameters
QRYFILE(LIB/FILE)
COMANDOS AS400
DSPDBR LIB/FILE Showslogicalsrelatedtoaphysicalfile

DIFFERENCES
BETWEEN INNER AND
OUTER JOIN.

COBOLIntrinsicFunctions

ThenewestflavorofCOBOL,genericallycalled20xbut
releasedbyIBMunderthenameofCOBOL/370(previous
versionwasCOBOLII,whichfollowedCOBOL85explain
thatnamingconvention),includesacollectionof
builtin,orintrinsic,functions.Thispagewill
discusstwocategoriesofthesefunctions:

DateFunctions

DateFunctions

ProbablythemostusefulintrinsicfunctionisCURRENT
DATEwhichisareplacementforACCEPTDATEandACCEPT
TIME.CURRENTDATEisY2Kcompliant,havinga4digit
year.Thisfunctionreturnsa20characteralphanumeric
fieldwhichislaidoutasfollows:
COMANDOS AS400
01WSCURRENTDATEFIELDS.
05WSCURRENTDATE.
10WSCURRENTYEARPIC9(4).
10WSCURRENTMONTHPIC9(2).
10WSCURRENTDAYPIC9(2).
05WSCURRENTTIME.
10WSCURRENTHOURPIC9(2).
10WSCURRENTMINUTEPIC9(2).
10WSCURRENTSECONDPIC9(2).
10WSCURRENTMSPIC9(2).
05WSDIFFFROMGMTPICS9(4).

Sonotonlycanyougetthetimedowntothe
millisecond,butyoucangetthedifferencebetween
yourtimeandGreenwichMeanTime.

ThefunctionisusedinaMOVE:

MOVEFUNCTIONCURRENTDATETOWSCURRENTDATE
FIELDS

Butnormallyreferencemodificationisusedtoonly
grabthepartyouwant:

*Getthecurrentdateinyyyymmddformat
MOVEFUNCTIONCURRENTDATE(1:8)TOWSTODAY

*Getthecurrenttimeinhhmmssformat
MOVEFUNCTIONCURRENTDATE(9:6)TOWSTIME

Theotherintrinsicdatefunctionsdealwithconverting
betweeneitherGregoriandatesorJuliandatesandan
internalIntegerformat.ThisIntegerformatissimply
thenumberofdayssincesomepredetermined,fixeddate
like1/1/0001.Thesefourconversionfunctionsare:

*ConvertfromGregoriantoIntegerformats
COMPUTEWSINTEGERDATE=FUNCTIONINTEGEROFDATE
(WSDATE)

*ConvertfromIntegertoGregorianformats
COMPUTEWSDATE=FUNCTIONDATEOFINTEGER(WS
INTEGERDATE)

*ConvertfromJuliantoIntegerformats
COMPUTEWSINTEGERDATE=FUNCTIONINTEGEROFDAY
(WSJULIANDATE)
COMANDOS AS400
*ConvertfromIntegertoJulianformats
COMPUTEWSJULIANDATE=FUNCTIONDAYOFINTEGER(WS
INTEGERDATE)

AllGregorianandJuliandatesareexpectedtohave4
digityears.

Youmightbeaskingjustwhatintheheckwouldyou
wantwiththisintegerdate.Well,withitcalendar
mathisabreeze.Youneedtoknowwhatdateis150
daysfromtoday(andthiskindofstuffhappensmore
oftenthanyou'dthink)?Converttodaytoaninteger
date,add150toitandconvertitback.Nomore
checkingwhichmonthsyou'regoingthroughtoseeif
it'sa30dayor31daymonth.Nomoreleapyear
calculations.It'sprettyautomatic:

01WSTODAYPIC9(8).
01WSFUTUREDATEPIC9(8).

....

MOVEFUNCTIONCURRENTDATE(1:8)TOWSTODAY.
COMPUTEWSFUTUREDATE=FUNCTIONDATEOFINTEGER
(FUNCTION
INTEGEROFDATE(WSTODAY)+
150)

COMPUTEisOKbecausewe'reonlyusingintegershere.

Howmanydaysbetweentwodates?

COMPUTEWSDAYS=FUNCTIONINTEGEROFDATE(WSDATE1)

FUNCTIONINTEGEROFDATE(WSDATE2)

ConvertingbetweenGregorianandJulianformatsusedto
beapainalso.Now:

COMPUTEWSDATE=FUNCTIONDATEOFINTEGER(FUNCTION
INTEGEROFDAY(WSJULIAN))

NumericFunctions

It'sdoubtfulthattherewillbemuchuseformostof
thenumericfunctionsavailable.Someofthemore
COMANDOS AS400

usefulones:

*Calculatethesquarerootofanumber
COMPUTEWSRESULT=FUNCTIONSQRT(WSNUMBER)

*Gettheremainderfromdividingtwointegers
COMPUTEWSRESULT=FUNCTIONMOD(WSINTEGER1,WS
INTEGER2)

*Gettheremainderfromdividingtwononintegers
COMPUTEWSRESULT=FUNCTIONREM(WSNUMBER1,WS
NUMBER2)
Therearealsogeometricfunctions(SIN,COS,TAN),log
functions(LOG,LOG10),FACTORIALandevenRANDOMfor
generatingrandomnumbers.

Ctlfc CompilarCLambienteHomologao

RUNSQLSQTM ExecutarScriptSQL

Buscas no Ingenium
COMANDOS AS400

Buscas de Mensagem no Ingenium

Mensagem: CS9115 9067


COMANDOS AS400

SHIFT + F4
COMANDOS AS400

F3

Dspjoblog + F10
COMANDOS AS400