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



Darryl,

Do you set off the KF indicator explicit in the DDS screen format definition?

KF

-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] Im Auftrag von DFreinkel
Gesendet: Freitag, 25. Juni 2021 15:41
An: RPG programming on IBM i
Betreff: Re: Trying to setof *INKF

Jon
The answer is yes.

I have to play with INDARA to see what effect that will have

What is interesting is that the program exits the subroutine but then on returning to the next loop it sees the indicator as off

Thanks

Sent from my iPhone

On Jun 24, 2021, at 11:20 PM, Roger Harman <roger.harman@xxxxxxxxxxx> wrote:

< snip >
I hope this is right because seeing this old style code is making my head ache Darryl.
< /snip >

That was my first thought Jon <grin>.

We have a lot of old code in my shop. I'm fortunate to work on mostly new development - so grateful for **free.

On the other hand, I have a colleague who is doing new development in fixed format RPG, subroutines - no procedures, and using SEU to boot.
It's the old "1 year of experience repeated 30 times..."



-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon Paris
Sent: Thursday, June 24, 2021 2:43 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Trying to setof *INKF

Is ivudshw5 the record format in play? Or does it have the same indicator associated with it? If so then the "Clear" may set the indicator off depending on the INDARA setting.



Jon Paris

On Jun 24, 2021, at 1:38 PM, dfreinkel@xxxxxxxxxxxxxxxxx wrote:



Darryl Freinkel
A4G
Telephone: 770.321.8562 Mobile: 678.355.8562

c* ---------------------------------------------------
c* Proc_Add - add additional requirements for FOR STOCK or Screws
c* ---------------------------------------------------

c Proc_Add begsr

c | clear ivudshw5
c* eval wFinish = dFinish
c* eval wPart = dPart
c* eval wDesc = ddesc
c* eval wQtyReqd = dqtyr
c* eval WQOH = donhand
c* eval wQTOO = dToOrder
c* eval wNewQTO = dToOrder

c | doU *inKF or *inKL
F6 or F12

c | | write msgctl
error messages
c | | exfmt ivudshw5
c | | exsr $CLRMS

c | | select
c | | when *inKC
F3
c | | | leavesr

c | | when *inKL
F12
c | | | eval wRRN1 += 1
c | | | iter

| | | // Write to files if valid

c | | when *inKF and not wErrors
F6

c | | | exsr proc_addValid

c | | | if wErrors
c | | | | eval *inKF = *off
c* iter
c | | | else

c | | | | if wReq_Type = 'FOR STOCK'
c | | | | | eval wRcd_type = 'S'
c | | | | elseif wReq_Type = 'SCREWS'
c | | | | | eval wRcd_Type = 'T'
c | | | | else
c | | | | | eval wRcd_Type = ' '
c | | | | endif

| | | | chain ( wSched_DATE : wRcd_Type
:wFinish :
| | | | wPart) IVSUML05;

c | | | | if not %found(ivsuml05)
c | | | | | clear ivsumf05
c | | | | | eval sudate = wSched_Date
c | | | | | eval sufnop = fnfnop
c | | | | | eval sufnds = wFinish
c | | | | | eval supart = wPart
c | | | | | eval supdsc = wDesc
c | | | | | eval sustat = '1'
c | | | | | eval sutype = wRcd_Type
c | | | | | eval suptyp = 'P'
c | | | | | eval suqtyr = wQtyReqd
c | | | | | eval suqoh = wQOH
c | | | | | eval suqtyo = wQTOO

c | | | | | write ivsumf05
c | | | | Endif

c* update low level quantities

| | | | // FOR STOCK records

c | | | | if wReq_Type = 'FOR STOCK'
c wPart | | | | | chain mfbomp
c | | | | | DoW %found(MFBOMP) and not
%eof(MFBOMP)

c | | | | | | if mbend <> *blanks
c wPart | | | | | | | reade mfbomp
c | | | | | | Endif

c | | | | | | clear ivreqf
c | | | | | | eval ivshdt = wSched_Date
c | | | | | | eval ivlnqt = wQtyReqd
c | | | | | | eval ivmpt# = wPart
c | | | | | | eval ivdesc = wDesc
c | | | | | | eval ivfnOP = FNFNOP
c | | | | | | eval ivfnds = wFinish
c | | | | | | eval ivbth = 'C'
c | | | | | | eval ivprnt = wPart
c | | | | | | eval ivprnq = wQtyReqd
c | | | | | | eval ivuplt = mbcomp
c | | | | | | eval ivuplq = wQTOO *
mbQtyP

c | | | | | | write ivreqf

c wPart | | | | | | reade mfbomp
c | | | | | Enddo

c | | | | Endif

| | | | // Add SCREW requirement

c | | | | if wReq_Type = 'SCREWS'

c | | | | | clear ivreqf
c | | | | | eval ivshdt = wSched_Date
c | | | | | eval ivlnqt = wQtyReqd
c | | | | | eval ivmpt# = wPart
c | | | | | eval ivdesc = wDesc
c | | | | | eval ivfnOP = FNFNOP
c | | | | | eval ivfnds = wFinish
c | | | | | eval ivbth = 'P'
c | | | | | eval ivprnt = wPart
c | | | | | eval ivprnq = wQtyReqd
c | | | | | eval ivuplt = mbcomp
c | | | | | eval ivuplq = wQTOO * mbQtyP

c | | | | | write ivreqf

c | | | | endif
c | | | Endif

c | | other
c | | | exsr proc_addValid
c | | Endsl

c | Enddo

c Endsr
c* ---------------------------------------------------
c* proc_addValid - Validate screen when adding lines to the schedule.
c* ---------------------------------------------------

c proc_addValid Begsr

| // Validations

c | eval wErrors = *off
c | eval *in41 = *off
c | eval *in42 = *off
c | eval *in43 = *off
c | eval *in44 = *off
c | eval *in45 = *off
c | eval *in46 = *off

| // Check FOR STOCK or SCREWS
| // Using SQL to convert to upper case

| exec sql values upper(:wReq_Type) into
:wReq_Type ;

c | if wReq_Type <> 'FOR STOCK' and
c | | wReq_Type <> 'SCREWS'
c | | eval wErrors = *on
c | | eval *in41 = *on
C | | MOVE 'PL00017' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
c | Endif

| // Finish

c wFinish | chain oefshl04
c | if not %found(oefshl04)
c | | eval wErrors = *on
c | | eval *in42 = *on
C | | MOVE 'PL00018' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
C | else
C | | if fnbth <> 'P'
c | | | eval wErrors = *on
c | | | eval *in41 = *on
C | | | MOVE 'PL00019' MSGFLD
C | | | eval msgdta = *blanks
C | | | EXSR $SNDMS
c | | Endif
c | Endif

| // Part Number
c* eval wPart = dPart
c | clear wPart_save

c | if wPart = *blanks
c | | eval wErrors = *on
c | | eval *in43 = *on
c | | eval wDesc = *all'*'
C | | MOVE 'PL00008' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
c | else
c | | exsr getPartDesc
c | | if %found(TLCSTP)
c | | | eval wDesc = ddesc
c | | else
c | | | eval wErrors = *on
c | | | eval *in43 = *on
c | | | eval wDesc = *all'*'
C | | | MOVE 'PL00008' MSGFLD
C | | | eval msgdta = *blanks
C | | | EXSR $SNDMS
c | | Endif
c | Endif

| // Qty > 0

c | if wQtyReqd <= 0
c | | eval wErrors = *on
c | | eval *in44 = *on
C | | MOVE 'PL00003' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
c | Endif

c | if wQOH < 0
c | | eval wErrors = *on
c | | eval *in45 = *on
C | | MOVE 'PL00015' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
c | Endif

c | if wQTOO <= 0
c | | eval wErrors = *on
c | | eval *in46 = *on
C | | MOVE 'PL00005' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
c | Endif

| // does it have a BOM

c wPart | chain mfbomp
c | if not %found(mfbomp)
c | | eval wErrors = *on
C | | MOVE 'PL00016' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
c | Endif

| // does an entry for this already exist

| chain ( wSched_DATE : wFinish : wPart)
IVSUML01;
c | if %found(IVSUML01)
c | | eval wErrors = *on
C | | MOVE 'PL00020' MSGFLD
C | | eval msgdta = *blanks
C | | EXSR $SNDMS
c | Endif

c Endsr
c* ---------------------------------------------------

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Frpg400-l&amp;data=04%7C01%7C%7Cd55326383b1743a16c7f08d937590442%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601677726521220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=y8fWc%2BY%2FNasxEsaa7x9nO2NPD4%2FkV1iWi4%2F1QVad%2FPE%3D&amp;reserved=0
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Frpg400-l&amp;data=04%7C01%7C%7Cd55326383b1743a16c7f08d937590442%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601677726521220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fpRHUc0c8g5rv3T%2F9USJD5lygMac7Znk1ZFCDh385oM%3D&amp;reserved=0.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Famazon.midrange.com%2F&amp;data=04%7C01%7C%7Cd55326383b1743a16c7f08d937590442%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601677726521220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=BRAILzRBUVXDyLXEDpBiI%2F144EFmY9X1qULl7%2Fu52zI%3D&amp;reserved=0

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Frpg400-l&amp;data=04%7C01%7C%7Cd55326383b1743a16c7f08d937590442%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601677726521220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=y8fWc%2BY%2FNasxEsaa7x9nO2NPD4%2FkV1iWi4%2F1QVad%2FPE%3D&amp;reserved=0
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Frpg400-l&amp;data=04%7C01%7C%7Cd55326383b1743a16c7f08d937590442%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601677726521220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fpRHUc0c8g5rv3T%2F9USJD5lygMac7Znk1ZFCDh385oM%3D&amp;reserved=0.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Famazon.midrange.com%2F&amp;data=04%7C01%7C%7Cd55326383b1743a16c7f08d937590442%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637601677726521220%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=BRAILzRBUVXDyLXEDpBiI%2F144EFmY9X1qULl7%2Fu52zI%3D&amp;reserved=0
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


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.