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



This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I have a CL program that passes parms to an RPGIV program that writes the data 
being passed to a printer.  The RPGIV program works fine.

I have taken that same report program and had the program write to a file 
instead of a printer.  Somehow, I am getting a data decimal error in the 
program that writes to a file.  I have not changed anything but the output.  
When I do a simple conditional operation such as: "IF       PARM_01 = *ZERO", a 
data decimal error occurs.

CL program passing the parms
==================================
DCL        VAR(&PAPPIDIN)    TYPE(*DEC)    LEN(1 0)
DCL        VAR(&POPIDIN)      TYPE(*DEC)    LEN(1 0)
DCL        VAR(&PUSRPRF)       TYPE(*CHAR) LEN(10)
DCL        VAR(&PIPADDRIN) TYPE(*CHAR) LEN(15)
DCL        VAR(&PIPLENIN)    TYPE(*DEC)    LEN(5 0)
DCL        VAR(&POPLENIN)   TYPE(*DEC)    LEN(5 0)
DCL        VAR(&POPINFOIN)  TYPE(*CHAR) LEN(9999)
DCL        VAR(&PALLOWOP)  TYPE(*CHAR) LEN(4)

CHGVAR     VAR(&PAPPIDIN)  VALUE(%BINARY(&APPIDIN))
CHGVAR     VAR(&POPIDIN)   VALUE(%BINARY(&OPIDIN))
CHGVAR     VAR(&PUSRPRF)   VALUE(&USRPRF)
CHGVAR     VAR(&PIPADDRIN) VALUE(&IPADDRIN)
CHGVAR     VAR(&PIPLENIN)  VALUE(%BINARY(&IPLENIN))
CHGVAR     VAR(&POPLENIN)  VALUE(%BINARY(&OPLENIN))
CHGVAR     VAR(&POPINFOIN) VALUE(&OPINFOIN)
CHGVAR     VAR(&PALLOWOP)  VALUE(&ALLOWOP)

CALL       PGM(FTPLOG/FTPRQSRPT) PARM(&PAPPIDIN +
             &POPIDIN &PUSRPRF &PIPADDRIN &PIPLENIN +
             &POPINFOIN &POPLENIN &PALLOWOP)
===================================

RPG program receiving the parms
===================
D P01APPIDIN      S                1  0
D P01OPIDIN        S                1  0
D P01USRPRF         S              10
D P01IPADDRIN   S              15
D P01IPLENIN      S                 5  0
D P01OPINFOIN   S           9999
D P01OPLENIN     S                5  0
D P01ALLOWOP    S               4

C                      IF       P01APPIDIN = *ZERO   <<<<< Data Decimal Error 
occurs here
===================

Anyone see why this is happening only when I use the RPG pgm to write to a file 
and not to the RPG pgm that writes to a printer?

TIA,

Frank
--




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.