×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
you could use sql:
dcl-ds Records likeds(Record) dim(*auto:100);
dcl-ds Record Qualified;
Fld1 int(10);
Fld2 varchar(10);
end-ds;
Exec Sql Declare C1 Cursor for Select Fld1, Fld2 from file where timestamp = '0001-01-01';
Exec Sql Open C1;
Exec Sql Fecth C1 for 100 rows into :Records;
Dow %Elem(Records) > 0;
<Update record>
Exec Sql Fecth C1 for 100 rows into :Records;
Enddo;
or 1 sql statement:
Exec Sql Update file
Set Fld1 = 'value'
where timestamp = '0001-01-01';
________________________________
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Javier Sanchez <javiersanchezbarquero@xxxxxxxxx>
Sent: Tuesday, October 15, 2024 12:34 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Check for uninitialised timestamp field
You have to check for that value, the simplest way in an RPG program is to
test against *LOVAL, as a timestamp type it will yield to that value.
hth
JS
El mar, 15 oct 2024 a las 11:07, Dave (<dfx1@xxxxxxxxxxxxxx>) escribió:
Hi,
I want to read a file and update only the records for which the timestamp
field has not yet been modified. It shows up as :
0001-01-01 00:00:00.000000
Do I have to test for this value or is there a simpler way?
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Frpg400-l&data=05%7C02%7C%7Cac65a3ab8168410f8fec08dced3fb782%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638646105148307594%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=KCt0fJneqPx39KzU6WaD22Tn%2FU9zOsr0c4ldeQKUzhM%3D&reserved=0<https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Frpg400-l&data=05%7C02%7C%7Cac65a3ab8168410f8fec08dced3fb782%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638646105148337365%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=C8uhkgrSqjVAJOpWSNUs5wgsbFtE9pQ2oW5Nvx%2FQYSE%3D&reserved=0<https://archive.midrange.com/rpg400-l>.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Frpg400-l&data=05%7C02%7C%7Cac65a3ab8168410f8fec08dced3fb782%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638646105148364149%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=PHf6hAqvPpvsTq%2B9E%2B2rbX2%2FnrSIVM58CNooQZETZxs%3D&reserved=0<
https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Frpg400-l&data=05%7C02%7C%7Cac65a3ab8168410f8fec08dced3fb782%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638646105148378765%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=XchQMcILoVy7XPz8d7%2F9OlY0RT37KjbO82%2F8pIC5Faw%3D&reserved=0<
https://archive.midrange.com/rpg400-l>.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.