After successfully executing my code, when i try to access some other utilities like Fileaid or Xped ....iam not able to access it. The only way i can use Fileaid, Xped is to logoff my session and login again.
I think the prob is with Allocation of my pds to SYSPROC. Can someone tell me how to de-allocate my pds from SYSPROC in the rexx pgm. I tried giving
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Sat Nov 08, 2003 7:02 am Post subject:
Don't you feel bad when you have to learn by burning your fingers? But, that is how it is.
When you asked for allocation, it did allocate the PDS to SYSPROC but, removed the other allocations too. aThe workaround is to use TSO CONCAT. But, I do not think it is universal.
The opposite of ALLOC is FREE.
But, once when you have done a ALLOC to SYSPROC and then do a FREE, I doubt, whether the earlier allocations would be re-instated. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
As far as I know, there is no way to De-CONCAT without undoing the original concatenation that went into forming SYSPROC, which ruins it usefulness. That's why it's important to only do the sysproc/myproc concatenation ONCE per TSO session.
Ron _________________ A computer once beat me at chess, but it was no match for me at kick boxing.
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Sat Nov 08, 2003 8:47 am Post subject:
Ron,
Is CONCAT universal? It is working here and used to work at my former company. But, I remember reading somewhere that this is not universal.
I have never used CONCAT in a REXX EXEC. I have always used TSO CONCAT at the command line. There it prompts for a DD name and a DSN in this order. I did not know in a REXX EXEC, the CONCAT is to be used for two DD names rather than DSN to a DD name. Thanks for this info, Ron. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
I haven't worked in very many shops, but have found CONCAT in all of them, so far. I DO tend to believe that it is NOT universal, however.
I've never tried TSO CONCAT at the command line. I've always coded my environmental stuff in a SETUP exec that I execute once each time I invoke TSO.
Ron _________________ A computer once beat me at chess, but it was no match for me at kick boxing.
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
Posted: Mon Nov 10, 2003 10:37 am Post subject:
Here's some code written by a colleague that I've lost track of.
Code:
/* REXX */
/* */
/* =====>> LIMITED WARRANTY. */
/* */
/* =====>> THIS EXEC IS TO BE USED AT YOUR OWN RISK */
/* =====>> ORIGINAL CODE FROM ALAN ARNETT */
/* */
/* FORMAT: REALLOC DDNAME DSNAME(DSNLIST) */
/* {ADD|DROP} {FIRST|LAST} */
/* */
/* DDNAME - THE EXISTING DDNAME TO BE MODIFIED. */
/* DSNAME - THE LIST OF DSNAMES TO ADD OR DROP. */
/* ADD - THE DSNAMES ARE TO BE ADDED. */
/* ADD IS THE DEFAULT IF DROP IS NOT */
/* SPECIFIED. */
/* DROP - THE DSNAMES ARE TO BE REMOVED. */
/* FIRST - THE DSNAMES ARE TO BE ADDED BEFORE */
/* THE EXISTING ALLOCATED DATASETS. */
/* LAST - THE DSNAMES ARE TO BE ADDED BEHIND */
/* THE EXISTING ALLOCATED DATASETS. */
/* LAST IS THE DEFAULT IF FIRST IS NOT */
/* SPECIFIED. */
/* */
/* - FIRST|LAST MEANS NOTHING FOR A DROP REQUEST */
/* BUT NO ERROR IS GENERATED IF IT IS USED */
/* - IF CONFLICTING OPTIONS ARE SPECIFIED, THE LAST */
/* ONE IS USED. */
/* - KEYWORDS MAY BE SPECIFIED IN ANY ORDER, ONLY */
/* DDNAME IS POSITIONAL. */
/* */
ARG DDNAME ARGLIST
DSNCNT = WORDS(ARGLIST)
IF DSNCNT = 0 | LENGTH(DDNAME) = 0 | LENGTH(DDNAME) > 8
THEN SIGNAL PARM_ERROR
CALL PARSE_ADD /* SET DEFAULTS */
CALL PARSE_LAST
CALL PARSE_PARM
CALL PROCESS
EXIT
PARM_ERROR:
SAY 'INVALID PARAMETER LIST'
EXIT
PROCESS:
X = OUTTRAP("DS.")
"LISTA STA"
X = OUTTRAP("OFF")
DO I = 1 TO DS.0 UNTIL (WORD(DS.I,1) == DDNAME)
END
DSNLIST = ''
IF I > DS.0 THEN DO
SAY 'DDNAME' DDNAME 'IS NOT CURRENTLY ALLOCATED'
END
ELSE DO;
DS.F = I - 1
DO I = DS.F + 3 TO DS.0,
UNTIL ((LEFT(DS.I,1) = ' ') & (LEFT(DS.I,4) \= ' '));
END;
DS.L = I - 2
DO J = DS.F TO DS.L BY 2
IF POS(DS.J, NEWLIST) = 0
THEN DSNLIST = DSNLIST "'"DS.J"'"
END
IF OPTION_ADD = 'Y'
THEN IF OPTION_POS = 'L'
THEN DSNLIST = DSNLIST NEWLIST
ELSE DSNLIST = NEWLIST DSNLIST
"ALLOC FI("DDNAME") DA("DSNLIST") SHR REUSE"
END;
RETURN
PARSE_PARM:
NEWLIST = ''
DO WHILE LENGTH(ARGLIST) > 0
PARSE VAR ARGLIST OPTION ARGLIST
IF DEBUG = 'Y' THEN SAY 'PARM='OPTION 'IS BEING PARSED'
SELECT
WHEN ABBREV('DEBUG',OPTION, 2) THEN DEBUG = 'Y'
WHEN ABBREV('ADD',OPTION, 1) THEN CALL PARSE_ADD
WHEN ABBREV('DROP',OPTION, 2) THEN CALL PARSE_DROP
WHEN ABBREV('FIRST',OPTION, 1) THEN CALL PARSE_FIRST
WHEN ABBREV('LAST',OPTION, 1) THEN CALL PARSE_LAST
WHEN LEFT(OPTION,3) = 'DSN' THEN CALL PARSE_DSN
OTHERWISE
SIGNAL PARM_ERROR
END
END
RETURN
PARSE_DSN:
PARSE VAR OPTION OPT1 '(' DSNX
IF ABBREV('DSNAME', OPT1, 2) <> 1
THEN SIGNAL PARM_ERROR
DO UNTIL DSNX = ')'
THEN DO
DSNX = LEFT(DSNX,LENGTH(DSNX)-1)
ARGLIST = ')' ARGLIST
END
IF LEFT(DSNX,1) <> "'" & LEFT(DSNX,1) <> '"'
THEN DSNX = "'"SYSVAR(SYSPREF)"."DSNX"'"
IF DEBUG = 'Y' THEN SAY 'REBUILT DSNX='DSNX
IF POS(DSNX, NEWLIST) = 0
THEN NEWLIST = NEWLIST DSNX
PARSE VAR ARGLIST DSNX ARGLIST
IF DEBUG = 'Y' THEN SAY 'PARSED DSNX='DSNX
END
IF DEBUG = 'Y' THEN SAY 'NEWLIST='NEWLIST
RETURN
PARSE_ADD: /* DEFAULT */
IF DEBUG = 'Y' THEN SAY 'PARM=ADD HAS BEEN SET'
OPTION_ADD = 'Y'
RETURN
PARSE_DROP:
IF DEBUG = 'Y' THEN SAY 'PARM=DROP HAS BEEN SET'
OPTION_ADD = 'N'
RETURN
PARSE_LAST: /* DEFAULT */
IF DEBUG = 'Y' THEN SAY 'PARM=LAST HAS BEEN SET'
OPTION_POS = 'L'
RETURN
PARSE_FIRST:
IF DEBUG = 'Y' THEN SAY 'PARM=FIRST HAS BEEN SET'
OPTION_POS = 'F'
RETURN
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum