I am getting the error -193 while executing a rexx code to rename a file.
-----
Code:
IKJ56644I NO VALID TSO USERID, DEFAULT USER ATTRIBUTES USED
ACF0C038 ACF2 LOGONID ATTRIBUTES HAVE REPLACED DEFAULT USER ATTRIBUTES
28 *-* ADDRESS 'TSO' 'RENAME' "'"INPDSN"'" NEWNAME
+++ RC(-193) +++
RENAMING OF FILE FAILED. RC CODE = -193
READY
END
---------------
I HAVE GOOGLED TO CHECK -193 ERROR CODE BUT COULDN'T FIND ANY RESULT.
My actual REXX code looks like below:
Code:
INPDSN = "TBHX.U1.FITS.ACH"
IF SYSDSN("'"INPDSN"'") ¬= 'OK'
THEN DO
SAY 'INPUT FILE NOT PRESENT'
EXIT
END
/* FIND DATE AND TIME INFOR FOR OUTPUT FILE */
CALL FIND_DATETIME
/* FIND SEQ NUMBER FOR OUTPUT FILE */
CALL FIND_SEQUENCE
/* CREATE NEW FILE NAME AND RENAME OLD FILE */
NEWNAME="'"INPDSN"."DATETIME"."SEQ"'"
ADDRESS 'TSO' 'RENAME' "'"INPDSN"'" NEWNAME
IF RC ¬= 0
THEN DO
THEN DO
[b] SAY 'RENAMING OF FILE FAILED. RC CODE =' RC [/b]
EXIT
END
CALL CD_GEN
EXIT
FIND_DATETIME:
NEWDAT = ""DATE(U)""
TS = ""DATE(U)"" ""TIME()""
PARSE VAR TS 1 MM1 3 . 4 DD 6 . 7 YY 9 . 10 HH 12 . 13 MM2 15
SELECT
WHEN MM1 = 01 THEN M1 = 'A'
WHEN MM1 = 02 THEN M1 = 'B'
WHEN MM1 = 03 THEN M1 = 'C'
WHEN MM1 = 04 THEN M1 = 'D'
WHEN MM1 = 05 THEN M1 = 'E'
WHEN MM1 = 06 THEN M1 = 'F'
WHEN MM1 = 07 THEN M1 = 'G'
WHEN MM1 = 08 THEN M1 = 'H'
WHEN MM1 = 09 THEN M1 = 'I'
WHEN MM1 = 10 THEN M1 = 'J'
WHEN MM1 = 11 THEN M1 = 'K'
WHEN MM1 = 12 THEN M1 = 'L'
OTHERWISE NOP
END
DATETIME = M1||DD||YY||'.'||'T'||HH||MM2
RETURN
FIND_SEQUENCE:
SEQDSN = "'TBHX.U1.AP.SEQN'"
IF SYSDSN(SEQDSN) = 'OK'
THEN DO
"ALLOC F(SEQFIL) SHR DS("SEQDSN")"
IF RC ¬= 0
THEN DO
SAY 'ALLOCATION OF SEQ FILE FAILED. RC CODE =' RC
EXIT
END
DROP SEQFLD
"EXECIO 2 DISKRU SEQFIL (STEM SEQFLD. FINIS"
IF RC = 0 THEN DO
CURRSEQ = SUBSTR(SEQFLD.1,1,3)
PREVDAT = SUBSTR(SEQFLD.2,1,8)
END
ELSE DO SAY 'ERROR IN READING FILE. RC CODE =' RC
EXIT
END
END
ELSE DO
"ALLOC FI(SEQFIL) DA("SEQDSN") SPACE(10,10) TRACKS LRECL(80)
RECFM(F) BLKSIZE(0) NEW REUSE"
IF RC ¬= 0
THEN DO
SAY 'CREATION OF SEQ FILE FAILED. RC CODE =' RC
EXIT
END
SEQFLD.1 = '001'
CURRSEQ = SEQFLD.1
PREVDAT = NEWDAT
"EXECIO 1 DISKW SEQFIL (STEM SEQFLD. FINIS"
IF RC ¬= 0
THEN DO
SAY 'INSERTING FIRST ROW TO SEQ FILE FAILED. RC CODE =' RC
EXIT
END
END
IF SUBSTR(NEWDAT,1,8) ¬= SUBSTR(PREVDAT,1,8) THEN DO
SEQFLD.1 = '001'
CURRSEQ = '001'
END
IF RC ¬= 0
THEN DO
SAY 'WRITING IN SEQUENCIAL FILE FAILED. RC CODE =' RC
SAY 'THIS NEEDS TO BE TAKEN CARE MANUALLY'
SAY 'ADD 1 TO SEQUENCE NUMBER AND UPDATE'
EXIT
END
thanks for the reply. but i think access is not the reason. the job is schedlued in OPC and the id with which the job is submitted has all the auth's for renaming the dataset.
actually the strange thing is - when I am running the job its working properly now. but when it is run thru the scheduler - its failing with the above error.
As when I am running the job with my id -its working and failing when run thru OPC scheduler- the guys are saying it might be because of the older versions REXX procs at scheduler.
I am still debugging that..
But can anyone give idea about how to pass the symbolic parameters from JCL to rexx.
In my jcl i have a dataset like: &RUN.&FLPFX..FITS.ACH
RUN=TIB.,
FLPFX='PS'
I have to rename the dataset using REXX. But I dont know how to pass on that &RUN, &FLPFX to REXX and so i used
INPDSN = "TIB.PS.FITS.ACH"
in REXX and Release team is not accepting such hard-coding in Rexx parms..
Can anybody pls help - how to pass on this prefixes (symb parameters) to REXX.
1. PS020 STEP Calls a pgm and generates two o/p files.
&RUN.&FLPFX..FITS.NON.ACH.NOTR, and
&RUN.&FLPFX..FITS.ACH.NOTR,
2. PS030, PS040 steps eliminates some records (records that are present in o/p files generated in prev Job run) from the above two files
3. PS041, PS042, PS043, PS044:
the o/p files are copied to PREV files so that o/p files of next job run can be compared with these files.
&RUN.&FLPFX..FITS.NON.ACH
&RUN.&FLPFX..FITS.ACH files are same as o/p files of PS020 except they contain a trailer (total no of records)
4. PS050, PS070 are rexx steps to rename the files
&RUN.&FLPFX..FITS.NON.ACH
&RUN.&FLPFX..FITS.ACH
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
Well, the JCL has the symbolics defined, so all you need to do is to change the JCL to put the required symbolics into the PARM= of the two REXX execs, and amend the REXX code to read them.
Why two seperate REXX programs to do the renames. Would one not suffice ?