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



Hi, Vern:

You may need more than a simple MOVE ... what are you going to do about the "century" digits?

Suppose the data in the 6 character field is a "date" stored in "yymmdd" format.

Consider for example, the value _991231_ ... If you just MOVE it into that data structure, the value in the 8-digit field will be, _00991231_ ...
But, is that what you want? Or, do you want it to be _19991231_ ? Similarly, for the value _131231,_ you may want the result to be _20131231_ ...

You might scan the data, using an SQL "select distinct" on just the two positions, to see whether or not you need to worry about this. Perhaps all of your "dates" are already in the current century, so you can just "stuff" the value "20" in the first two digit positions. Otherwise, you may want to use date "windowing" as was common during Y2K conversions, by choosing a "pivot" year ...

HTH,

Mark S. Waterbury

> On 8/17/2013 11:39 AM, Vernon Hamberg wrote:
I've a zoned 8,0 that is being MOVEd to a packed 6,0. I want to convert
this to free form.

I can think of putting the zoned 8,0 into a data structure with a zoned
6,0 overlaying the last 6 positions, then use an assignment statement.

In the following, I wanted to use CNVDAT instead of CNVDT8. That can
work with fields from a file, didn't work so far, so will use an
assignment of CNVDT8 = CNVDAT for now.

* Allow "MOVE" of 8-digit ot 6-digiy
D DATE8TO6 DS
D CNVDT8 8s 0
D CNVDT6 6S 0 overlay(DATE8TO6 : 3)

Then CNVDT6 should have the value I want - this is 8-digit dates to
6-digit in YMD format.

Is there a better way? I looked at several articles - Bob Cozzi, Jon
Paris, some other forums - none that I saw dealt with the MOVE from a
longer numeric to shorter.

TIA
Vern


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.