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



First off, my 'duh' moment: when i changed from using an F-spec to an EDS
I left the chain to the file in the program. . . hello, anyone home?
It still didn't work/compile but the extra compile listing messages
obfuscated things, anyway, several resolutions -

Here was the original pgm (after weeding out chaff)

//*********************************************************************
// Program....: lmitr - original program this works
//*********************************************************************
h dftactgrp(*no) actgrp(*caller)

flmit if e k disk

d gWhse# s 2 0 inz(1)
d gProd# s 9 0

d myds ds
d custarrdata
d lcust1 overlay(custarrdata)
d lcust2 overlay(custarrdata:*next)
d lcust3 overlay(custarrdata:*next)
d lcust4 overlay(custarrdata:*next)
d lcust5 overlay(custarrdata:*next)
d lcust6 overlay(custarrdata:*next)
d lcust7 overlay(custarrdata:*next)
d lcust8 overlay(custarrdata:*next)
d lcust9 overlay(custarrdata:*next)
d lcus10 overlay(custarrdata:*next)
d custarr overlay(custarrdata)
d dim(10) like(lcust1)

/free
gProd# = 12160;
chain (gWhse#:gProd#) lmit;
*inlr = *on;
return;
/end-free

Here is what i was trying to do (that did not work even after I removed the 'chain')

//*********************************************************************
// Program....: lmitr2 - this doesn't compile
//*********************************************************************
h dftactgrp(*no) actgrp(*caller)

d lmitds e ds extname(lmit)

d myds ds
d custarrdata
d lcust1 overlay(custarrdata)
d lcust2 overlay(custarrdata:*next)
d lcust3 overlay(custarrdata:*next)
d lcust4 overlay(custarrdata:*next)
d lcust5 overlay(custarrdata:*next)
d lcust6 overlay(custarrdata:*next)
d lcust7 overlay(custarrdata:*next)
d lcust8 overlay(custarrdata:*next)
d lcust9 overlay(custarrdata:*next)
d lcus10 overlay(custarrdata:*next)
d custarr overlay(custarrdata)
d dim(10) like(lcust1)

/free
*inlr = *on;
return;
/end-free

I got Jon's idea to work

//*********************************************************************
// Program....: lmitr3 - this works
//*********************************************************************
h dftactgrp(*no) actgrp(*caller)

d lmitds e ds extname(lmit)
d custarr overlay(lmitds:62)
d dim(10) like(lcust1)

/free
clear lmitds;
lcust2 = 1234;
*inlr = *on;
return;
/end-free

I got something similar to Kevin's idea to work

//*********************************************************************
// Program....: lmitr4 - appears to work
//*********************************************************************
h dftactgrp(*no) actgrp(*caller)

d lmitds e ds extname(lmit)

d custarr s based(ptr)
d dim(10) like(lcust1)

/free
clear lmitds;
ptr = %addr(lcust1);
lcust2 = 1234;
*inlr = *on;
return;
/end-free

The likerec idea from Allan didn't seem to fly but, i really only made a
feeble stab at it as the above suited me fine

//*********************************************************************
// Program....: lmitr5 - this doesn't compile
//*********************************************************************
h dftactgrp(*no) actgrp(*caller)

d lmitds e ds extname(lmit)

d myds ds likerec(lmitr:*input)
d lcust1 overlay(myds:62)
d lcust2 overlay(myds:*next)
d lcust3 overlay(myds:*next)
d lcust4 overlay(myds:*next)
d lcust5 overlay(myds:*next)
d lcust6 overlay(myds:*next)
d lcust7 overlay(myds:*next)
d lcust8 overlay(myds:*next)
d lcust9 overlay(myds:*next)
d lcus10 overlay(myds:*next)
d custarr overlay(myds:62)
d dim(10) like(lcust1)

/free
*inlr = *on;
return;
/end-free

Oh, this is the file I was looking to load from

File Name . . . . LMIT
Library . . . . WSFILESHL
Format Descr . .
Format Name . . . LMITR
File Type . . . . PF Unique Keys - Y

Field Name FMT Start Lngth Dec Key Field Description
LPRD# S 1 9 00 K02 PRODUCT NUMBER
LCOMP S 10 2 00 K01 Whs#
LDESC A 12 50 DESCRIPTION
LCUST1 S 62 7 00 LIMITED CUSTOMER 1
LCUST2 S 69 7 00 LIMITED CUSTOMER 2
LCUST3 S 76 7 00 LIMITED CUSTOMER 3
LCUST4 S 83 7 00 LIMITED CUSTOMER 4
LCUST5 S 90 7 00 LIMITED CUSTOMER 5
LCUST6 S 97 7 00 LIMITED CUSTOMER 6
LCUST7 S 104 7 00 LIMITED CUSTOMER 7
LCUST8 S 111 7 00 LIMITED CUSTOMER 8
LCUST9 S 118 7 00 LIMITED CUSTOMER 9
LCUS10 S 125 7 00 LIMITED CUSTOMER 10

Thanks to all for help and suggestions, all very good.

John B.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.