Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Allocating dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
Author Message
ksvenky

New User


Joined: 09 Aug 2007
Posts: 4
Location: India

PostPosted: Tue May 20, 2008 2:10 pm    Post subject: Allocating dataset
Reply with quote

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
View user's profile Send private message
References
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3168
Location: italy

PostPosted: Tue May 20, 2008 2:27 pm    Post subject: Reply to: Allocating dataset in REXX
Reply with quote

check the profile prefix settings
or include the dataset name in apostrophes ==>'<==
Back to top
View user's profile Send private message
ksvenky

New User


Joined: 09 Aug 2007
Posts: 4
Location: India

PostPosted: Tue May 20, 2008 2:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3168
Location: italy

PostPosted: Tue May 20, 2008 2:44 pm    Post subject: Reply to: Allocating dataset in REXX
Reply with quote

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
View user's profile Send private message
ksvenky

New User


Joined: 09 Aug 2007
Posts: 4
Location: India

PostPosted: Tue May 20, 2008 3:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
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: 3168
Location: italy

PostPosted: Tue May 20, 2008 3:10 pm    Post subject: Reply to: Allocating dataset in REXX
Reply with quote

post a trace of Your rexx script
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3304
Location: Charlotte,NC USA

PostPosted: Tue May 20, 2008 3:14 pm    Post subject: Reply to: Allocating dataset
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

PostPosted: Tue May 20, 2008 9:20 pm    Post subject: Reply to: Allocating dataset
Reply with quote

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
View user's profile Send private message
ksvenky

New User


Joined: 09 Aug 2007
Posts: 4
Location: India

PostPosted: Wed May 21, 2008 12:42 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3168
Location: italy

PostPosted: Wed May 21, 2008 12:51 pm    Post subject: Reply to: Allocating dataset
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

PostPosted: Wed May 21, 2008 10:18 pm    Post subject: Reply to: Allocating dataset
Reply with quote

> 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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3304
Location: Charlotte,NC USA

PostPosted: Wed May 21, 2008 10:25 pm    Post subject: Reply to: Allocating dataset
Reply with quote

Ahh ... LINES is a REXX/VM function, related to the CHARIN function.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1