|
>>> I need to pass some parameters in/out to/from it from my SNAP-IX server and >>>when I check >>> the AS/400 log,I find that the cobol program was called but get an error >>>saying >>> "missing parameters".I think the problem is mainly related to the way the >>>cobol program >>> is dealing with the DataArea. I think it is likely that a control language program calls the cobol now since there are parameters. The COBOL is for sure needing parameters on the call. If the cobol is using the local data area, it should be accepting that info internally in the program, and not a parameter, and the local data area, or any data area, is set up prior to the call to cobol. If it is not a local data area, then you typically read that data area from disk into a runtime variable then call cobol using the retrieved data as parameter(s). This all reinforces the need for a controlling program, the control language program that sets up the run for the cobol. The AS/400 command >> DSPPGM YOURCOBOL will show you the number of parameters. It sounds like you need to encapsulate the cobol program in a control language program that will handle your new environment. For instance, lets call it control1. SNAP calls program control1, it loads and asks: If current user=SNAP then do retrieve data area into parameter1, and so on call cobol1 using parameters enddo else do call cobol1 the old way endo endif end program. In summary: 1) Parms are needed for the cobol call. If you don't know them on SNAP then you have to find them on the AS/400. 2) How you set up your SNAP calls is new and likely different than any AS/400 person expected at design time. Also, if you run into problems with decimal exceptions, try passing your parameter as a hex value in the format of CALL MYPGM X'ff' X'f0' X'f2' Hope this sheds some light. markvilla@knology.net +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.