How To Get System Date In Cl Program

Posted on

I am running my games at a resolution of 1024x768 (the widescreen hacks aren't working correctly for some reason, they make the game screen very jittery even if I change the window settings to a 16:9 resolution). I don't have any reason to think that'll fix things but it's worth a shot. Not really sure why the cheats aren't working, I'm sorry. You have a very capable PC so I'm not sure why you're running at such low resolutions to begin with, but I'd suggest you try using the multipliers (4x Native, 5x Native, 6x Native, etc) instead to see if that fixes your issue. As you said, they seem to be loading fine on the console log.:- Have you tried one of the 1.3.1 development builds? Pnach files for pcsx2 2016.

Currently I looking for the simplest way to retrieve previous month in CL Programming.
For example,
I want to get the previous month from system value Qmonth, assuming current month is JULY 2004, so my expected result will be JUNE 2004.
And I also may want to get the value of last few months from system value Qmonth.
For example,
I want to get the value in past 3 months, assuming current month is JAN 2005, my expected result will be DEC 2004, NAV 2004 and OCT 2004.
I tried to create the CL program, but it's very hard to do it bacause I need to create many variables in order to archive it. And also have to take care of the program logic when the month is 1st few months of the year if I want to get the month values of past Qmonth.
Hope any expert in CL programming can give me some guidance, thank you very much.

October 12, 2005 Bruce Guetzkow

I use CL (and now CLLE) procedures, rather than RPG, to do as much work as I can. It’s usually quicker to write CL than RPG because IBM has given us a great wealth of commands that perform all kinds of activities. Perhaps the most powerful commands are the RTV (Retrieve) commands, which retrieve information about objects (e.g., libraries and files) and non-objects (e.g., jobs and file members) alike. The Retrieve commands can only be used in CL, CLLE, and REXX procedures. Here’s a sampling of some of the data that you can retrieve.

RTVJOBA: Retrieve Job Attributes. This command retrieves information about the job in which it is running.

Here are some of my favorite values that can be retrieved:

  • JOB, USER, NUMBER: These values uniquely identify the currently running job and can be used in other commands to get even more information.
  • DATE: This is the job date, which is the date the job started, in the job-date format. Be aware that if your job begins before midnight and ends after, this date does not change.
  • TYPE: If you need to do different processing based on whether the job is running interactively or in batch, this value can be tested. A ‘0’ indicates batch, ‘1’ is interactive.
  • CURUSER: You can get the user profile that is running the job from this value.
  • DATETIME: If you need more than just the job date, this value contains the date and time in the format YYYYMMDDHHNNSSXXXXXX which has the time down to microseconds. If you want the job date in YYYYMMDD format, you can extract the first eight characters directly from this value.

Here’s an example:

RTVOBJD: Retrieve Object Description. Specify an object and object type and you can find out lots of valuable information.

  • RTNLIB: This value will tell you the library where the object resides. This is especially useful if you specify *LIBL for the object name and need to determine the library in which the object is stored.
  • OBJATR: If the object specified is of certain types (e.g., a program or file), this value will identify the type of object (RPG, COBOL, PF, LF, etc.).
  • TEXT: This is the text used to describe the object when it was created.
  • OWNER: This value indicates the current owner of the object.
  • CRTDATE: If you need to know the date and time that an object was created, this value contains that information in the format CYYMMDDHHMMSS.
  • CRTUSER: As you might have guessed, this is the user that created the object.

The following example illustrates RTVOBJD.

RTVMBRD: Retrieve Member Description. Specify a file (and optionally a member) and you can find out more about that file.

  • RTNLIB: This value will tell you the library where the file resides. Like RTVOBJD, this parameter is especially useful if you specify *LIBL for the file name and need to determine the library.
  • RTNMBR: Just like the previous parameter, if you didn’t specify a member by name, this value will contain that member name.
  • SRCTYPE: If the file is a source file, this value will contain the source type of the specified member.
  • TEXT: This is the text used when the member was created.
  • NBRCURRCD: This is perhaps my favorite parameter from all of the RTV commands. Many times I only need to perform actions if a file actually has data in it. This value contains the current number of data records in the file and member specified.

Here’s an example of the RTVMBRD command.

The RTVMBRD command can be used in a loop to process all members of a multi-member file (physical or source). On the first execution of the command specify the MBR parameter as MBR(*FIRST *SAME) (to process in creation-date order) or MBR(*FIRSTMBR *SAME) (to process in alphabetical-name order). On subsequent executions of the command, specify MBR(&RTNMBR *NEXT). Be sure to specify parameter RTNMBR each time you execute the command so that you’ll have the value for the next iteration. Alternatively you can specify MBR(*LAST *SAME) or MBR(*LASTMBR *SAME) followed by MBR(&RTNMBR *PRV) to read through the members in reverse order.

Embed Guia Actividades Pulpo Esta Crudo. El pulpo esta crudo luis maria pescetti pdf.

The following short example illustrates how to process all members of a file in alphabetical order.

It doesn’t get much easier than that. You can specify as few or as many parameters for the RTV commands as you like; just remember to define the return variables. When you prompt on the command the parameter descriptions tell you the variable sizes. If you want to see all of the RTV commands available, just go to a command line, key in RTV*, press Enter, explore, and enjoy!

Bruce Guetzkow has programmed on the AS/400 and iSeries since 1990, in manufacturing, distribution, and other industries. He is currently the IS director at United Credit Service in Elkhorn, Wisconsin. Click here to contact Bruce by e-mail.