View previous topic :: View next topic
Author
Message
shanudarling Warnings : 1 New User Joined: 20 Dec 2006Posts: 55 Location: noida
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
Akatsukami Global Moderator Joined: 03 Oct 2009Posts: 1788 Location: Bloomington, IL
It looks as if sequence numbers have been added to the lines. Change your edit profile to NUM OFF.
Back to top
shanudarling Warnings : 1 New User Joined: 20 Dec 2006Posts: 55 Location: noida
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
Pandora-Box Global Moderator Joined: 07 Sep 2006Posts: 1592 Location: Andromeda Galaxy
Shouldnt this be
Back to top
shanudarling Warnings : 1 New User Joined: 20 Dec 2006Posts: 55 Location: noida
Ü is actully " only.
The language is turkish, so after translation it will change..
Back to top
daveporcelan Active Member Joined: 01 Dec 2006Posts: 792 Location: Pennsylvania
Why is the allocate commented out?
Code:
/* ÜALLOC DD(INTERNAL) SHRÜ */
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10872 Location: italy
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
vasanthz Global Moderator Joined: 28 Aug 2007Posts: 1742 Location: Tirupur, India
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
Nic Clouston Global Moderator Joined: 10 May 2007Posts: 2455 Location: Hampshire, UK
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
Akatsukami Global Moderator Joined: 03 Oct 2009Posts: 1788 Location: Bloomington, IL
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
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
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
shanudarling Warnings : 1 New User Joined: 20 Dec 2006Posts: 55 Location: noida
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
Please enable JavaScript!