× 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.



If you are looking to simply copy without writing a program, I believe SQL
will be your best option.

Look into the following SQL functions and see what works best for your.

CHAR(BADGEID)
SPACE(1)


SELECT CHAR(BADGEID) FROM EMPLOYEE_INFO_TABLE

Results
1
2
3
34
334


SELECT SPACE(8-LEN(TRIM(CHAR(BADGEID)))) CONCAT CHAR(BADGEID) FROM
EMPLOYEE_INFO_TABLE

Results
1
2
3
34
334





On Wed, Nov 26, 2014 at 9:38 AM, Glenn Gundermann <
glenn.gundermann@xxxxxxxxx> wrote:

Since V5R3 10 years ago, you can specify the character(s) to trim in RPG.
For example, newBadgeId = %TRIML(badgeId:'0 ') will trim leading zeros and
spaces.


Yours truly,

Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Work: (905) 795-2111 ext. 3098 (until Nov. 28)
Cell: (416) 317-3144

On 25 November 2014 at 18:07, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx
wrote:

HI I have to create a file based on employee badge info.

there is name and dept 40 characters each.

the badge id is 3 but they want the PF to hold 8 for futures.

when I created the field as 8 character, it adds leading zeros so I made
the field numeric 8S 00 but they want it to be character.

Any ideas how to copy without throwing in the leading zeros? I think an
RPG
program would be the way but is there any way in a CL or Command?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.