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

check existence of one record without using chain or read?

1 Answers   IBM,


When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?

5 Answers   Mphasis,


1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?

1 Answers   HP,


what is estimation? and what is the level identifier parameter in PF?

3 Answers   TCS,


What hapens when we use CPYF command to copy a LF? On which PF will it be dependent???

7 Answers   HSBC, Systime,






i'm working on progA , in that program i want to see the userids of the users who work on this program?

10 Answers   Four soft,


A pgm subroutine calling child subroutine, that child subroutine again calling parent subroutine, u have 1000 lines of code, with out debugging , how can u find that error??? Is there any command to find errors in pgm???

3 Answers   HSBC,


How we will read call stack?

4 Answers  


How to update selected fields from pf without using update opcode. How to read all member in Rpg-3,without using any cl command?

8 Answers  


How to set on/off a group of indicators in a single statement?

3 Answers  


in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file in qtemp no of records in file in library qtemp is checked wat shud be the count of records let say it was 10 initially endpgm

2 Answers  


how to display all the members records in a physical file without using ovrdbf?

9 Answers  


Categories