Link to home
Start Free TrialLog in
Avatar of royaltech
royaltech

asked on

Convert text field to numeric OS/400

I need to copy standard file using cpyf or equivalent by specific date range, but I need to convert a column with a character text string into a numeric field on the copied file. Is there a way to do that during or after the copy?  It’s conflicting with a cross reference report I run in crystal reports which cannot cross links that are not of the same type.

Thanks, Corey
ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_276102
Member_2_276102

Dave:

If myfile is a "standard file" of type *STMF or it's a flat program-described file, SQL will be a bit more complex. No?

Tom
Hi Tom
you are right, i assumed that since they were using  crystal reports that the files would be externally described.

Dave
Hmmm... good point (I think). I'm not up on CR, so not sure of all of its features.

Creating a SQL view seemed likely, and your general method is as good as any to create it. But I'm not yet clear why there is an issue in CR. I thought perhaps one file has a field defined character while a related file has the same data in a numeric field. But shouldn't CR allow an SQL statement to link such files anyway?

Tom
Avatar of royaltech

ASKER

I guess I'm over my head, I had our AS400 consultant, PDK build us a logical file, thank you to you all.
Corey:

Don't hesitate to ask followup questions if you need clarification in the future. Questions might be "How do I find out my operating system version?" or "How can I display the field description?" You put enough points on this to get premium help, IMO. I'm pretty sure you could have gotten a lot more info out of this.

For what it's worth for future questions.

Tom