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



On 2010/10/1 2:40 PM, Jim Minisce wrote:
... In this scenario, I know the file exists in the IFS and
I have full rights to the file but the program returns a not found value. Below
is the relevant code in question. I am testing the program with the following
call statement:
call MYPRGM300 parm('/home/gd290jem/PlmExtract.Dat').

* Program Parameters
*
D MYPRGM300 Pr Extpgm('MYPRGM300')
D File_Path 45a Const

Jim, when you call a program from the command line with a character parameter, and the program expects a parameter longer than 32 bytes, you have to pass the full length of the parameter as expected by the program. The system will only pad your parameter up to 32 bytes, so in your case the last 13 bytes will contain garbage.

Try this:
call MYPRGM300 parm('/home/gd290jem/PlmExtract.Dat ')

Or better, add a *CMD interface for your program:

CMD source:
CMD PROMPT('Call MYPRGM300')
PARM KWD(PATH) TYPE(*CHAR) LEN(45) PROMPT('File path')

CRTCMD MYLIB/MYPRGM300 PGM(MYLIB/MYPRGM300)

Then use the command like this to call your program:
MYPRGM300 PATH('/home/gd290jem/PlmExtract.Dat')

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.