IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Bad arithmetic conversion


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Jun 11, 2012 8:00 pm
Reply with quote

Hi,
I am new to rexx.
I have a requirement to create a rexx program which will get 6 inputs of 5 bytes each. These inputs will be passed to a batch program using SYSIN from JCL.
I have written the rexx code and the clist but I am getting "Bad arithmetic conversion" error.

Code:

/* REXX - KKT */                                           
PARSE UPPER ARG EDAT','EML','SDRID','ESUB','EBOD','BDATA . 
PARSE UPPER ARG PROGNAME,PARAMETRE                         
EDAT = SUBSTR(PARAMETRE,1,5)                               
EML = SUBSTR(PARAMETRE,6,10)                               
SDRID = SUBSTR(PARAMETRE,11,15)                             
ESUB = SUBSTR(PARAMETRE,16,20)                             
EBOD = SUBSTR(PARAMETRE,21,25)                             
BDATA = SUBSTR(PARAMETRE,25,30)                             
ADDRESS TSO                                                 
ÜPROFILE NOPREFIXÜ                                         
SAY 'PARAMETRELER: '                                       
SAY  EDAT EML SDRID ESUB EBOD BDATA                         
JBNAME=DTEMBLN1                                             
PARM01=ÜEDATÜ                                               
PARM02=ÜEMLÜ                                               
PARM03=ÜSDRIDÜ                                                         
PARM04=ÜESUBÜ                                                         
PARM05=ÜEBODÜ                                                         
PARM06=ÜEDATAÜ                                                         
LN.1 =Ü//ÜJBNAMEÜ JOB ,'SAP ODEME',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),Ü
LN.2 =Ü//         REGION=6M,COND=(0,NE)Ü                               
LN.3 =Ü//JOBLIB   DD DSN=CEE.SCEERUN,DISP=SHRÜ                         
LN.4 =Ü//         DD DSN=F000.TEST.LOADBA,DISP=SHRÜ                   
LN.5 =Ü//         DD DSN=T000.TEST.LOADBA,DISP=SHRÜ                   
LN.6 =Ü//         DD DSN=P000.TEST.LOADBA,DISP=SHRÜ                   
LN.7 =Ü//STEP020  EXEC PGM=IKJEFT01,DYNAMNBR=20Ü                 
LN.8 =Ü//SYSOUT   DD  SYSOUT=*Ü                                   
LN.9 =Ü//SYSPRINT DD  SYSOUT=*Ü                                   
LN.10=Ü//SYSDBOUT DD  SYSOUT=*Ü                                   
LN.11=Ü//SYSABOUT DD  SYSOUT=*Ü                                   
LN.12=Ü//SYSUDUMP DD  SYSOUT=*Ü                                   
LN.13=Ü//SYSTSPRT DD  SYSOUT=*Ü                                   
LN.14=Ü//OUTFILE  DD DSN=DTEM.TEST.BLN.IMPRT.FILE,DISP=SHRÜ       
LN.15=Ü//PRMFILE DD DSN=DTEM.INPFILE.BLNC.PARM,DISP=SHRÜ         
LN.16=Ü//INFILE  DD DSN=DTEM.INPFILE.BLN1,DISP=SHRÜ               
LN.17=Ü//ERRFILE DD DSN=DTEM.ERRFILE.BLN1,DISP=SHRÜ               
LN.18=Ü//SYSIN    DD    *Ü                                       
LN.19=ÜPARM01Ü                                                       
LN.20=ÜPARM02Ü                                                       
LN.21=ÜPARM03Ü                                                       
LN.22=ÜPARM04Ü                                                       
LN.23=ÜPARM05Ü                                                       
LN.24=ÜPARM06Ü                                                       
LN.25=Ü//SYS001   DD  SYSOUT=MÜ                                       
LN.26=Ü//SYSTSIN  DD *Ü                                               
LN.27=Ü  DSN SYSTEM(DB0T)Ü                                           
LN.28=Ü    RUN PROGRAM (KRDPBLN1) PLAN(PFTEM99)Ü                     
LN.29=Ü  ENDÜ                                                         
LN.30=Ü/*Ü                                                           
/* PREPARE A TEMP DSN FOR SUBMIT */                                   
/* ÜALLOC DD(INTERNAL) SHRÜ */                                       
FLR=Ü                                                                Ü
DO I=1 TO 30                                                         
  LN.I=LEFT(LN.I''FLR,80)               
END                                     
'EXECIO * DISKW  INTERNAL(STEM LN.'     
'EXECIO 0 DISKW  INTERNAL(FINIS'         
EXIT 000                                 


When i run the module by passing the following parameters 12345,12345,12345,12345,54321,54321 i get the following error -

Code:

IKJ56621I INVALID COMMAND NAME SYNTAX                                         
    10 *-* ADDRESS TSO                                                         
    00100000                                                                   
       +++ RC(-3) +++                                                         
IKJ56712I INVALID KEYWORD, 00110000                                           
PARAMETRELER:  00120000                                                       
      00050000            00060000                 00070000                   
  00080000                           00080000                                00
080000 00130000                                                               
    64 +++  DO I=1 TO 30                                                       
     00820000                                                                 
IRX0041I Error running BIL, line 64: Bad arithmetic conversion           
***                                                                           


Please help.
thanks
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Jun 11, 2012 8:02 pm
Reply with quote

It looks as if sequence numbers have been added to the lines. Change your edit profile to NUM OFF.
Back to top
View user's profile Send private message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Jun 11, 2012 8:11 pm
Reply with quote

tried after doing NUM OFF'

Code:

PARAMETRELER:                                                                 
                                                                               
                                                                               
IRX0555E The input or output file INTERNAL is not allocated. It cannot be opened
 for I/O.                                                                     
IRX0670E EXECIO error while trying to GET or PUT a record.                     
***                                                                           
                                                                             
[/code]
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Jun 11, 2012 8:18 pm
Reply with quote

Code:
Ü
Shouldnt this be
Code:
"
Back to top
View user's profile Send private message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Jun 11, 2012 8:22 pm
Reply with quote

Ü is actully " only.
The language is turkish, so after translation it will change..
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon Jun 11, 2012 8:24 pm
Reply with quote

Why is the allocate commented out?

Code:
/* ÜALLOC DD(INTERNAL) SHRÜ */   
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Jun 11, 2012 8:26 pm
Reply with quote

seems so, but different codepages might mangle special chars

and strange enough when looking at the topic the <odd> char
is displayed in the <bbcoded> text as an umlaut U

but when editing the topic or in the summary when replying it is displayed as Ü


oddities of the 3270 emulation code pages
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Jun 11, 2012 8:28 pm
Reply with quote

Hi,
The error you posted clearly states that,
INTERNAL is not assigned to anything. In your case internal reader.

I think you would need an alloc statement assigning INTERNAL to internal readder destination.
or
If the REXX is run via Batch, then I think you would need a DD name INTERNAL pointing to Internal reader location.

Example:(May need modification to your site)
ADDRESS TSO "ALLOC FI(INTERNAL) SYSOUT(X) WRITER(INTRDR) REUSE"

Your Nick: shanudarling.. *me gusta* :-P
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jun 11, 2012 10:09 pm
Reply with quote

Why a rexx program AND a CList?

When debugging a rexx program use the trace debugging command - I usually use TRACE '?i' as it gives me the nitty-gritty straight away.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Jun 12, 2012 1:38 am
Reply with quote

shanudarling wrote:
tried after doing NUM OFF'

Code:

PARAMETRELER:                                                                 
                                                                               
                                                                               
IRX0555E The input or output file INTERNAL is not allocated. It cannot be opened
 for I/O.                                                                     
IRX0670E EXECIO error while trying to GET or PUT a record.                     
***                                                                           
                                                                             
[/code]

Would you not be better off creating a skeleton and using the ISPF file-tailoring services to fabricate your JCL?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 12, 2012 2:30 pm
Reply with quote

Akatsukami wrote:
Would you not be better off creating a skeleton and using the ISPF file-tailoring services to fabricate your JCL?

Yes the OP would, but maybe that means more work and reading documentation
Back to top
View user's profile Send private message
shanudarling
Warnings : 1

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Mon Jun 18, 2012 9:41 am
Reply with quote

Hi,
I have got the code working now. Thanks for all the replies. For reference, I am posting the working code.

Code:

/* REXX - KKT */                                         
/* TRACE R */                                             
PARSE UPPER ARG EDAT','EML','SDRID','ESUB','EBOD','BDATA 
ADDRESS TSO                                                             
ÜPROFILE NOPREFIXÜ                                                     
SAY 'PARAMETRELER: '                                                   
SAY  EDAT EML SDRID ESUB EBOD BDATA                                     
JBNAME=DTSTBLN1                                                         
PARM01=EDAT                                                             
PARM02=EML                                                             
PARM03=SDRID                                                           
PARM04=ESUB                                                             
PARM05=EBOD                                                             
PARM06=BDATA                                                           
LN.1 =Ü//ÜJBNAMEÜ JOB ,'SAP ODEME',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),Ü 
LN.2 =Ü//         REGION=6M,COND=(0,NE)Ü                               
LN.3 =Ü//JOBLIB   DD DSN=CEE.SCEERUN,DISP=SHRÜ                         
LN.4 =Ü//         DD DSN=FREG.TST.LOADLIB,DISP=SHRÜ                     
LN.5 =Ü//         DD DSN=TREG.TST.LOADLIB,DISP=SHRÜ                     
LN.6 =Ü//         DD DSN=PREG.TST.LOADLIB,DISP=SHRÜ                     
LN.7 =Ü//STEP020  EXEC PGM=IKJEFT01,DYNAMNBR=20Ü           
LN.8 =Ü//SYSOUT   DD  SYSOUT=*Ü                             
LN.9 =Ü//SYSPRINT DD  SYSOUT=*Ü                             
LN.10=Ü//SYSDBOUT DD  SYSOUT=*Ü                             
LN.11=Ü//SYSABOUT DD  SYSOUT=*Ü                             
LN.12=Ü//SYSUDUMP DD  SYSOUT=*Ü                             
LN.13=Ü//SYSTSPRT DD  SYSOUT=*Ü                             
LN.14=Ü//OUTFILE  DD DSN=DTST.TEST.FILE,DISP=SHRÜ
LN.15=Ü//PRMFILE DD DSN=DTST.PARM,DISP=SHRÜ   
LN.16=Ü//INFILE  DD DSN=DTST.BLN1,DISP=SHRÜ         
LN.17=Ü//ERRFILE DD DSN=DTST.ERRFILE,DISP=SHRÜ         
LN.18=Ü//SYSIN    DD    *Ü                                 
LN.19=PARM01                                               
LN.20=PARM02                                               
LN.21=PARM03                                               
LN.22=PARM04                                               
LN.23=PARM05                                         
LN.24=PARM06                                         
LN.25=Ü//SYSTSIN  DD *Ü                               
LN.26=Ü  DSN SYSTEM(DB0T)Ü                           
LN.27=Ü    RUN PROGRAM (TSTPBLN1) PLAN(PFTST99)Ü     
LN.28=Ü  ENDÜ                                         
LN.29=Ü/*Ü                                           
/* PREPARE A TEMP DSN FOR SUBMIT */                   
ÜALLOC DDN(INTERNAL)  DSN('DTST.TST.JCL(G15)') SHRÜ 
/*ÜALLOC DD(INTERNAL) SHRÜ */                         
FLR=Ü                                                 
DO I=1 TO 29                                         
  LN.I=LEFT(LN.I''FLR,80)                             
END                                                   
'EXECIO * DISKW  INTERNAL(STEM LN.'                   
'EXECIO 0 DISKW  INTERNAL(FINIS'                     
ADDRESS TSO 'SUB DTST.TST.JCL(G15)'
EXIT 000                             


In the above code, DTST.TST.JCL(G15) jcl will be created and then it will be submitted.
PARM01 to 06 need to be accepted in the program.

Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts SMF Record Date conversion failing CLIST & REXX 1
No new posts Assembler class assignment: stuck on ... PL/I & Assembler 12
Search our Forums:

Back to Top