Page 1 of 1

RPG Built in values such as *YEAR

Posted: Thu Jan 09, 2014 11:28 am
by chris_rover
Hi guys,
I have a program that has a profoundui version as well as a green-screen version.
when I view the value of *year on the green-screen version, I get "2014", but when I view the value of *year in profoundui, I get "2013".

also, I have another program which does some printer file over-riding, sending the printer file to specified outqs. when this is done from a green-screen program, the over-ride works perfectly. However, when done from a profoundui version, the overrides are ignored.

please help!

Re: RPG Built in values such as *YEAR

Posted: Thu Jan 09, 2014 11:50 am
by dennisw
*year is based on the start date of the job. Your ProfoundUI server was probably last started in 2013. You may have end and restart the ProfoundUI server.



It is better to use %DATE() rather thatn *DATE because %DATE() is the current date regardless of job date.

To get the current year use CURYR = %SUBDT(%DATE():*YEARS)

Re: RPG Built in values such as *YEAR

Posted: Thu Jan 09, 2014 12:04 pm
by Alex
And in regards to printer file overriding...

When running programs within the HTTP subsystem, generated spooled files can assigned to a separate job by the system, called the QPRTJOB. See here for some details: http://pic.dhe.ibm.com/infocenter/iseri ... prtjob.htm.

I believe you can fix this by change the OVRTPRF command to have OVRSCOPE(*JOB) and SPLFOWN(*JOB) as parameters.