|
This problem has been seen and discussed a lot before. I will try to explain: When your CL program submit to batch the RPG program, a string like the following is sent to the jobq: CALL PGM(RPGPGM) PARM(12345) Where 12345 is the value of the numeric parameter that you are passing to the program. Since when the job starts in batch, it does not know the structure of 12345, the system assume a packed numeric filed of 15 digit with 5 decimal position (15P5). Your Rpg program is certainly expecting a number formatted differently. There are several work around for this situation. Here are the 2 main one that I know: - use 15p5 numeric parameters in all 3 programs - use a command to call the second RPG. By submitting a command instead of a direct call, the structure of the different parameters willm be known when the programs statrs. hope this help Denis Robitaille Directeur services techniques Cascades Inc 819 363 5187 >>> fupingren@yeah.net 04/15/02 08:23am >>> This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Message ID . . . . . . : RPG0907 Date sent . . . . . . : 02/04/15 Time sent . . . . . . : 20:11:15 Message . . . . : INVX01B 4900 decimal-data error in field (C G S D F). Cause . . . . . : The RPG program INVX01B in library DERFP found a decimal-data error at statement 4900. One field did not contain valid numeric data. The digit and/or sign is not valid. Recovery . . . : Enter C to cancel, G to continue processing at *GETIN, S to obtain a system dump, or D to obtain an RPG formatted dump. Possible choices for replying to message . . . . . . . . . . . . . . . : D -- Obtain RPG formatted dump. S -- Obtain system dump. G -- Continue processing at *GETIN. C -- Cancel. More.. Dear Guys, I have a program mentioned before here. I use two RPG programm and one CLP programm to control interactive job or batch job. one RPG to check display file, Then call CL programm; and CL programm is receive parameter from the first RPG programm, then pass this parameter to the second RPG programm, certainly, if the special parameter is '1', I will submit this job to batch, otherwise for interactive. Problem is I run this programm through interactive job is very good, but run in batch will display error message on the above paster. Why? thanks a lot. Ping -- _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.