Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CONTINUE CODING ON NEXT LINE

Status
Not open for further replies.

thelearner

Programmer
Jan 10, 2004
153
US
Hi,

I have to call a pgm with 8 parms. I need to break this into 2 lines because the whole thing is too long. But pgm won't compile. This is how I break it.

CALLP PgmNam(parm1:parm2:parm3:parm4:parm5:parm6:parm7:+
parm8);



 
Take out the plus (+) sign. That is used only for concatenating strings in an expression, and for addition in an expression.

As an example:

Code:
   D Print_Report    PR                  Extpgm('ARR117')
   D Outq                          10A   Const           
   D Copies                         3P 0 Const           
   D Holdjq                         4A   Const           
   D Holdoq                         4A   Const           
   D Save                           4A   Const           
   D Nitrun                         4A   Const

In fixed format, it would be:

Code:
     C                   Callp     Print_Report(Outq   :  
     C                                          Copies :  
     C                                          Holdjq :  
     C                                          Holdoq :  
     C                                          Save   :  
     C                                          Nitrun)

In /free format, you don't need the callp unless you have to specify the (E) operations extender to check for run-time errors.
So, in your case, you can just code

Code:
PgmNam(parm1:parm2:parm3:parm4:
       parm5:parm6:parm7:parm8);

It's the semicolon (;) that defines the end of a statement, and in free format you don't need to use "+" or "-".



"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."

--Leonardo da Vinci

 
Thank you very much, flapeyre, for a detail explanation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top