Q:HI friends accually ihave one problem plesase let me know
the alternate code of this code.

Related field description of code:

Add a field, CALvsPRD, "Calendar Day Starts Before/After
Production Day" to the parameter set WRKORDER which accepts
values 'A' or 'B'
o B = Calendar Day Starts Before Production Day
o A = Calendar Day Starts After Production Day
o Any other value indicates the production and
calendar dates are always the same.


code:
Automatic Execution Of *INZSR Subroutine
/Z01 * retrieves WRKORDER field values.
/Z01 * Calculate default Production Date and return it to
caller.

/Z01 * Production date defaults to system date
/Z01 C Eval P@Pdate = %DATE()
/Z01 * unless Calendar date starts Before PDN(production)
date and
/Z01 * system time is before PDN Start Time then
/Z01 * PDN date is yesterday.
/Z01 C If W@CALvsPRD = 'B'
and
/Z01 C %TIME() < %TIME
(W@Strtime)
/Z01 C Eval P@Pdate -= %Day(1)
/Z01 * unless Calendar date starts After PDN date and
/Z01 * system time is *GE PDN(production) Start Time then
/Z01 * PDN date is tomorrow.
/Z01 C ElseIf W@CALvsPRD = 'A' and
W@Strtime > *Zero and
/Z01 C %TIME() >= %TIME
(W@STrtime)
/Z01 C Eval P@Pdate += %Day(1)
/Z01 C
EndIf
/Z01 C Eval *InLr = *On


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More RPG400 Interview Questions

i would like to know under what circumstance the object will get locked on AS400.

5 Answers   IBM,


suppose one file is used by 100 user and file is locked by 100 user, what are the impact analysis?

1 Answers  


how do u track msg in cl pgm???

1 Answers   CTS,


can anybody help me that what is the procedure of debugging the service program?

3 Answers   CSC,


what is the difference between SETON RT & RETURN?

5 Answers  






why we do STRSRVJOB in batch debugging in as400

1 Answers  


1.What is referential Integrity? 2.What is Foreign Key? 3.What is Transfer Control? 4.What is Free format?

3 Answers  


what is kids-rpg?

0 Answers   IBM,


This is my Physical file 'EMPS' existing in library "TAMIL1" and its record format is 'EMPRCD" a)its source is R EMPRCD ENO 4 0 ENAME 10 EADD 10 b)The records present in EMPS are as follows ENO ENAME EADD 0001 tamil coimbatore 0002 kumar bangalore 0003 sunder bangalore 0004 arunkumar chennai 0005 pandi hyderabad 0006 santhosh hyderabad 0007 sasi salem 0008 kalai chennai 0009 suresh hyderabad 0010 vijay bangalore 0011 Arul chennai 0012 velu chennai 0013 khan bangalore 0014 praba chennai 0015 praba.p coimbatore 0016 anand ooty 0017 raja erode 0018 sankar erode 0019 vadivel namakkal 0020 anbu chennai 0021 Ajith mumabi c)now i want to select the 'ENAME' field records starting with 'S' for that i have created a RPG program its source code is PGM DCLF FILE(TAMIL1/EMPS) DCL VAR(&MYENO) TYPE(*CHAR) LEN(4) OVRDBF FILE(EMPS) SHARE(*YES) OPNQRYF FILE((TAMIL1/EMPS)) QRYSLT('ENAME *EQ %WLDCRD("S *")') READ: RCVF RCDFMT(EMPRCD) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) CHGVAR VAR(&MYENO) VALUE(&ENO) SNDUSRMSG MSG(&MYENO) SNDUSRMSG MSG(&ENAME) SNDUSRMSG MSG(&EADD) GOTO READ END: CLOF OPNID(EMPS) DLTOVR FILE(EMPS) ENDPGM Is this coding correct sir,the program gets compiled,and if i call it it says query running but records are not displayed.please help me out

4 Answers   Virtusa,


What is the syntax of passing parameters to a procedure by value?

1 Answers  


What are the types of identifiers?

0 Answers  


Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?

1 Answers  


Categories