Page 1 of 1

why result is not returning to main module?

PostPosted: Mon Jan 23, 2017 3:11 pm
by SKANDA
Hi all,

Kindly help me to get the solution for the following code,

 nextfile = xyz.abc.def(mem1)
  nextfile ="'"nextfile"'"
  "alloc dd(file1) da("nextfile") shr reuse"
   "newstack"  
   call modul nextfile

modul --> name of a rexx pgm called from the main module
while executing result from the modul is retured as zero.i don't know why the pgm is not processing the nextfile..please help me to fix it.

inside the modul pgm nextfile is displayed as,
nextfile = 'xyz.abc.def(mem1)'

Re: why result is not returning to main module?

PostPosted: Mon Jan 23, 2017 3:30 pm
by SKANDA
hi all,

sorry ,I have misunderstood that the nextfile is not read by the program ..but it is reading,
the result is not returned to the main module..
What may be the err?

Thanks all,
Skanda

Re: why result is not returning to main module?

PostPosted: Mon Jan 23, 2017 4:13 pm
by prino
And we're all psychics who can see what you're doing in "modul".

FFS, stop wasting our time by asking questions that can be answered by simply RTFM, or cannot be answered because you do not give all the info required!

Re: why result is not returning to main module?

PostPosted: Mon Jan 23, 2017 9:48 pm
by NicC
Show us the trace from both modules.

Use the code tags when posting code/data.

Why not, simply:
nextfile = "'"data.set.name"'"

rather than the 2-step method that you show?

Re: why result is not returning to main module?

PostPosted: Tue Jan 24, 2017 4:51 pm
by SKANDA
Hi all,

Here is the trace for the code,

 
       535 *-*       "newstack"
       >>>             "newstack"
       536  *-*        call modul nextfile
      >>>           "xyz.abc.def(mem1)"
      1  +++  ?
       Error running modul, line1: Invalid character in program
        536 +++    call modul nextfile
      Error running Main1, line 536: Incorrect call to routine
     


I have used HEX ON option to find out the junk values..but in modul as well main1 there is no such character..
even though it says as invalid character in the modul

in the modul first line is the commented line.(/*rexx modul*/)

Anyone help me to fix this err.

Many Thanks,
Skanda

Re: why result is not returning to main module?

PostPosted: Tue Jan 24, 2017 9:21 pm
by willy jensen
instead of hex on, try F P'.' in modul member.

Re: why result is not returning to main module?

PostPosted: Wed Jan 25, 2017 11:06 am
by SKANDA
Hi all,
Thanks willy jensen for your response.
I have tried with , it shows as "No chars '.' found".

Thanks,
Skanda

Re: why result is not returning to main module?

PostPosted: Wed Jan 25, 2017 2:37 pm
by willy jensen
ok, then I suggest
1. verify that there is no other 'MODUL' in your SYSPROC / SYSEXEC concatenations. You could also change the name to something else more likely to be unique, i.e. MODUL789.
2. change the call to "%MODUL" nextfile to make sure that you execute the REXX and not a program.

If you still have the problem, then post the first 2 lines with hex on.