|
|
| Author |
Message |
ksvenky
New User
Joined: 09 Aug 2007 Posts: 4 Location: India
|
|
|
|
I'm searching for a file using some criteria and I'm extracting the file name. Now I need to read this file and search for some data. When I try to allocate the file, it says file cannot be found.
Assume the file name is stored in the variable DATANAME='XXXX.TEST.REXX'
Then I give
"ALLOC F(TESTFILE) DSN("DATANAME") SHR REUSE"
I get the error
AGSIO0033 Cannot allocate data set. Data set name not found. The file 'XXXX.TEST.REXX' does exist in the mainframe complex.
Regards
Venkat |
|
| Back to top |
|
 |
References
|
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3183 Location: italy
|
|
|
|
check the profile prefix settings
or include the dataset name in apostrophes ==>'<== |
|
| Back to top |
|
 |
ksvenky
New User
Joined: 09 Aug 2007 Posts: 4 Location: India
|
|
|
|
Please let me know how to check the check the profile prefix settings
Does include the dataset name in apostrophes ==>'<==
mean the following
ADDRESS TSO "ALLOC F(TESTFILE) DSN('"DATANAME"') SHR REUSE"
If this is what you meant, then I had also tried that. I am getting the same error. |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3183 Location: italy
|
|
|
|
can You see the dataset in option 3.4 ??
as far as the profile You have two choices
the setting should be displayed in the ISPF primary option menu
or by typing in the command line TSO PROFILE
| Code: |
Menu Utilities Compilers Options Status Help
覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧覧
ISPF Primary Option Menu
Option ===> tso profile
0 Settings Terminal and user parameters User ID . : IBMUSER
1 View Display source data or listings Time. . . : xx:xx
2 Edit Create or change source data Terminal. : 3278
3 Utilities Perform utility functions Screen. . : 1
4 Foreground Interactive language processing Language. : ENGLISH
5 Batch Submit job for language processing Appl ID . : ISR
6 Command Enter TSO or Workstation commands TSO logon : ISPFPROC
7 Dialog Test Perform dialog testing TSO prefix:
9 IBM Products IBM program development products System ID : xxxx
10 SCLM SW Configuration Library Manager MVS acct. : xxxx
11 Workplace ISPF Object/Action Workplace Release . : ISPF z:z
M More Additional IBM Products
Enter X to Terminate using log/list defaults
IKJ56688I CHAR(0) LINE(0) PROMPT INTERCOM NOPAUSE MSGID NOMODE WTPMS
G NORECOVER NOPREFIX PLANGUAGE(ENU) SLANGUAGE(ENU) VARSTORAGE(LOW)
IKJ56689I DEFAULT LINE/CHARACTER DELETE CHARACTERS IN EFFECT FOR THIS TERMINAL
***
|
|
|
| Back to top |
|
 |
ksvenky
New User
Joined: 09 Aug 2007 Posts: 4 Location: India
|
|
|
|
I am able to see the dataset uisng the option 3.4. I also tried the TSO PROFILE command. The value for PREFIX is my userid.
Also i tried the following
DATANAME=XXXX.TEST.REXX (with no quotes)
ADDRESS TSO "ALLOC F(TESTFILE) DSN('"DATANAME"') SHR REUSE"
I got the message <MYUSERID>.XXXX.TEST.REXX dataset NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED.
It is adding the default prefix to the dataset name. |
|
| Back to top |
|
 |
Moved: Tue May 20, 2008 3:05 pm by superk From CLIST & REXX to TSO/ISPF |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3183 Location: italy
|
|
|
|
| post a trace of Your rexx script |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3317 Location: Charlotte,NC USA
|
|
|
|
I find it odd that I can't find a description of the "AGSIO0033" error message anywhere. That doesn't seem like the usual sort of "IKJ" message you'd think you'd see.
Venkat, have you been able to look that error message up? |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 543 Location: work
|
|
|
|
I think your '(with no quotes)' example should have worked.
But try this:
| Code: |
/*include single quotes within string */
DATANAME= "'XXXX.TEST.REXX'" /* Fully qualified name */
ADDRESS TSO "ALLOC F(TESTFILE) DSN("DATANAME") SHR REUSE"
|
|
|
| Back to top |
|
 |
ksvenky
New User
Joined: 09 Aug 2007 Posts: 4 Location: India
|
|
|
|
Below is the code which i am executing
TRACE R
HLQ = 'SSO.D2001031.T608141.E200000'
ADDRESS TSO "ALLOC F("SSOFILE") DSN("HLQ") SHR REUSE"
ADDRESS MVS "EXECIO 1 DISKR "SSOFILE" (FINIS STEM IN."
CLINE = 0
DO WHILE (LINES("SSOFILE"))
CLINE = CLINE + 1
END
The output when i give HLQ = 'SSO.D2001031.T608141.E200000' and DSN("HLQ") is
READY
ISPSTART CMD(%DUMMY)
2 *-* HLQ = 'SSO.D2001031.T608141.E200000'
>>> "SSO.D2001031.T608141.E200000"
3 *-* ADDRESS TSO "ALLOC F("SSOFILE") DSN("HLQ") SHR REUSE"
>>> "ALLOC F(SSOFILE) DSN(SSO.D2001031.T608141.E200000) SHR REUSE"
DATA SET SP0944.SSO.D2001031.T608141.E200000 NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
MISSING DATA SET NAME+
MISSING NAME OF DATA SET TO BE ALLOCATED
+++ RC(12) +++
4 *-* ADDRESS MVS "EXECIO 1 DISKR "SSOFILE" (FINIS STEM IN."
>>> "EXECIO 1 DISKR SSOFILE (FINIS STEM IN."
The input or output file SSOFILE is not allocated. It cannot be opened for I/O.
EXECIO error while trying to GET or PUT a record.
+++ RC(20) +++
5 *-* CLINE = 0
>>> "0"
6 *-* DO WHILE (LINES("SSOFILE"))
AGSIO0033 Cannot allocate data set. Data set name not found.
6 +++ DO WHILE (LINES("SSOFILE"))
Error running DUMMY, line 6: Incorrect call to routine
ISPD117
The initially invoked CLIST ended with a return code = 20040
SP0944.SPFLOG1.LIST has been kept.
READY
END
The output when i give HLQ = 'SSO.D2001031.T608141.E200000' and DSN('"HLQ"') . Also when i try HLQ = "'SSO.D2001031.T608141.E200000'" and DSN("HLQ"), i get the same error.
READY
ISPSTART CMD(%DUMMY)
2 *-* HLQ = 'SSO.D2001031.T608141.E200000'
>>> "SSO.D2001031.T608141.E200000"
3 *-* ADDRESS TSO "ALLOC F("SSOFILE") DSN('"HLQ"') SHR REUSE"
>>> "ALLOC F(SSOFILE) DSN('SSO.D2001031.T608141.E200000') SHR REUSE"
4 *-* ADDRESS MVS "EXECIO 1 DISKR "SSOFILE" (FINIS STEM IN."
>>> "EXECIO 1 DISKR SSOFILE (FINIS STEM IN."
5 *-* CLINE = 0
>>> "0"
6 *-* DO WHILE (LINES("SSOFILE"))
AGSIO0033 Cannot allocate data set. Data set name not found.
6 +++ DO WHILE (LINES("SSOFILE"))
Error running DUMMY, line 6: Incorrect call to routine
ISPD117
The initially invoked CLIST ended with a return code = 20040
SP0944.SPFLOG1.LIST has been kept.
READY
END |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3183 Location: italy
|
|
|
|
in the first trace You have a tso prefix
in the second trace You use the LINES function
and IIRC it' s not supported in TSO REXX |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 543 Location: work
|
|
|
|
> 6 *-* DO WHILE (LINES("SSOFILE"))
> AGSIO0033 Cannot allocate data set. Data set name not found.
LINES is not a built-in function, but you must have some function package that allows provides it. Look at the documentation for it. I am just guessing, but maybe you need to provide the actual dataset name and not a DDname. in the LINES() call. |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3317 Location: Charlotte,NC USA
|
|
|
|
| Ahh ... LINES is a REXX/VM function, related to the CHARIN function. |
|
| Back to top |
|
 |
|
|