AS/400 Query Questions


Length of the entered value
Hi group, How to get the length of the entered value using WRKQRY? I am querying a file, the name field is defined as 15 characters. I need to get all those records whose name is greater than 10 Characters. Could anyone please help me how to write a query? Regards, M

Answer Question   |  March 8, 2013  3:37 AM
AS/400, AS/400 Query
asked by:
340 pts.

AS/400 Query – how do you split names in field into seperate fields
Trying to separate a field into three separate fields. The field is a name field, with lastname firstname mi with spaces in between each name. Is there a way to do this? I’ve tried everything I can think of, am out of ideas. Thanks in advance for your help

Answer Question   |  February 22, 2013  3:56 PM
AS/400, AS/400 Query, iSeries
asked by:
5 pts.

How do I convert a date in text format to a proper date with AS/400 Query
I have a date 20/02/2013 which is in text format but I need to convert it to a date format with a length of 10 and decimal of L (a normal date format). Basically I need to convert 20/02/2013 which is currently in text format to an ISO date format with Query using iSeries access [...]

Answer Question   |  February 21, 2013  11:22 AM
AS/400, AS/400 Query
asked by:
25 pts.

Date minus 1 month in January
AS/400 query, when I have TODAY = current(date), then when today – 1 month, If  the current date is Jan 1, 2013, will it be Dec 1, 2013 or Dec 1, 2012?  I assume Dec 1, 2012, but want to be sure.  Likewise, on Mar 1, 2013 current, it would give Feb 1, 2013, correct [...]

Answer Question   |  February 5, 2013  11:49 AM
AS/400, AS/400 Query
asked by:
15 pts.

Query in AS/400
I want to know how I can use the query in the AS/400?

Answer Question   |  January 23, 2013  9:36 AM
AS/400, AS/400 Query
asked by:
35 pts.

Query400 report generation
I’m using query400 tool and using output type as printer files.. I want to generate a report format of transactions like this.. date act# amount date1 act no1 total act no2 total act no3 total date1 act no1 total act no2 total Final Total example transaction is like date act# amount 23/10/12 100 200 23/10/12 [...]

Answer Question   |  October 24, 2012  9:01 AM
AS/400 Query
asked by:
140 pts.

Wild card search in AS/400 query
How do I find records that actually have percent sign in them using the like ‘%  “%”  %’ when the % is the wild card?

Answer Question   |  September 18, 2012  8:06 PM
AS/400, AS/400 Query, Wildcard
asked by:
40 pts.

Duplicate entries on the printed report
I have a written a query and do get results however when it populates the information it duplicates each entry X4.    

Answer Question   |  August 23, 2012  11:36 PM
AS/400, AS/400 Query
asked by:
10 pts.

AS/400 question
how can we see records in a physical file without using run query?

Answer Question   |  May 30, 2012  7:53 PM
AS/400, AS/400 Query
asked by:
5 pts.

Convert seconds into time format in QM Query
I have one scenario where i have time field as seconds and i need to convert this into time format like HH:MM:SS in 24 hour format in query 400. I am using V6R1M0. Can anyone help me on this ASAP? Thank in advance Saravanan D 

Answer Question   |  June 1, 2012  9:36 AM
AS/400 Query, AS/400 V6r1m0
asked by:
150 pts.

mixture of characters, numerics and special characters
i have a string which is a combination of characters,numerics and special characters. how to calculate number of characters,numerics and special characters present in it?

Answer Question   |  May 15, 2012  7:09 AM
AS/400, AS/400 Query
asked by:
5 pts.

AS/400 Query
I use Query400 to output negative temperatures to a database file. The output file is currently created by the query at run time. The data is output as packed but I need the sign separate. I can’t see how to convert the temperature to a character string either as the sign is ignored. Any other [...]

Answer Question   |  May 8, 2012  11:55 AM
AS/400, AS/400 database, AS/400 Query
asked by:
5 pts.

AS/400 Query – wild card for LIKE test
When I select records usinf the LIKE test, what wild card character do I use? LIKE ‘air%’?

Answer Question   |  March 17, 2012  1:18 AM
AS/400 Query, AS/400 Records
asked by:
5 pts.

IBM I-series Data Download
I run a query in query/400 and tried to download that file using IBM Iseries. in the downloaded file, the column headers are in field ids and not the descriptions i have given in Query/400 report column formatting. Is there any way to download a file with column descriptions given in query? Please suggest.

Answer Question   |  March 17, 2012  4:25 AM
AS/400 Query, AS400 iseries, Query/400
asked by:
185 pts.

Query Administration
Is there a way to get the last date a query was run?

Answer Question   |  March 17, 2012  5:15 PM
AS/400 Query
asked by:
5 pts.

AS/400 users profile changed
Can anyone provide me with information to query and produce a report that shows who was changed the user profile ?

Answer Question   |  March 31, 2012  9:58 AM
AS/400 Query, AS/400 user permissions, AS/400 user profiles, AS/400 user sessions
asked by:
105 pts.

t-sql and AS400
I want to develop a TSQL query. First I need to determine if all the numbers in one of the fields are in numerical order and also find the missing holes in the number sequence. Secondly I need to sort by another field and by a particular criteria.  The words that I need to sort-by [...]

Answer Question   |  March 31, 2012  12:34 PM
AS/400 Query, SQL, SQL Query, T-SQL
asked by:
1,185 pts.

i5 Query Security
Are there any commercial security programs that will secure the query function on the as400? We have user menus that keep users from viewing and changing critical files. However, we also have users who go into query and save the results of the query anywhere on the system.  I’m concerned that someone will save the results of [...]

Answer Question   |  March 31, 2012  7:01 PM
AS/400 Query, i5, I5 security, Query, Security
asked by:
5 pts.

Query400 authorizations
We have used a generic user ID for our support persons to sign on to a data center. Due to audit requirements we were forced to elimiate the Generic User. Many queries were created over the years for customers and were saved with *CHANGE auhority instead of *ALL. Now that the generic user is no [...]

Answer Question   |  March 31, 2012  1:18 PM
AS/400 Authorization List, AS/400 Query, AS/400 Query Security, Query/400
asked by:
100 pts.

AS400 Query: Date Concatenation
I work for a travel company whose Inventory file uses a unique field for each day of the month, e.g. LGRA1 is the first, LGRA2 is the second etc. The month and the year are single fields. Is there a way of converting these fields to concatenate the date to be able to link easily [...]

Answer Question   |  March 31, 2012  9:20 PM
AS/400, AS/400 Query, AS/400 Records, Date concatenation
asked by:
25 pts.