IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unrecognized I/O error during write


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Thu Dec 16, 2010 10:35 pm
Reply with quote

I am trying to add about 57 members to a PDS using the LM functions. I have allocated the PDS outside REXX and using the rexx routine to add different members to the PDS. The data to be stored in each member is coming from another PS file. However after processing correctly about 4 members correctly, the REXX is failing with "Unrecognized I/O error during write"

Logic flow is as follows:

Allocate the PS file
Read the PS file
LMINIT PDS
LMOPEN DATAID OUTPUT

for all records of PS file
LMADD member1
Allocate Fil1 for member1
Queue a few lines (based on criteria)
write form queue

(repeat above steps into member2, member3.... till end of PS file)

LMCLOSE PDS
LMCOMP PDS
LMFREE PDS

Questions are
Why I am facing the errror?
Why is this error coming after processing some records correctly?
Is this due to trying to add too many members?
What is the workaround?

PDS allocated with 20 Pri 20 Sec 20 Dir Blks LRECL 80

If I increase allocation to 50 50 50 the number of members processed goes upto 8.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1315
Location: Vilnius, Lithuania

PostPosted: Fri Dec 17, 2010 1:58 am
Reply with quote

Give the full allocate statement, 50 50 50 is totally meaningless, other than the fact that is probably means a max of 800 blocks of potentially 1 record, i.e. a total of 800 records...
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Fri Dec 17, 2010 10:11 am
Reply with quote

Please note that I am allocating the PDS fropm ISPF not thru REXX. By 50 50 50 I meant 50 Pri, 50 Sec and 50 Dir blk size
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1315
Location: Vilnius, Lithuania

PostPosted: Fri Dec 17, 2010 12:29 pm
Reply with quote

As I already wrote, 50, 50, 50 is totally meaningless.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Dec 17, 2010 4:11 pm
Reply with quote

LMADD ? That command doesnt exist.

The normal sequence to create a member is to fill it with LMPUT and
after that to issue a LMMADD.
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Fri Dec 17, 2010 10:15 pm
Reply with quote

I understand that whatever I have put as the logic just represents the flow. It may not be syntactically correct since I just want to represent the flow of the REXX routine. I am aware LMADD is actually LMMADD and is preceded by LMPUT.

But I am more interested in knowing why I am getting an Unrecognised I/O error. Is it because of space as in am I facing a space Abend? If so what is the work around? I need to add about 57 members to this PDS and the process is getting terminated after processing certain nos.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Dec 17, 2010 10:37 pm
Reply with quote

Hello,

Suggest you pre-allocate a much larger pds.

Then insert members in your process. . .
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Dec 17, 2010 10:43 pm
Reply with quote

What I don't get is, wouldn't an x37 type of error show up on the terminal at some point? Anyway, maybe it would be better to just build an IEBUPDT-ready dataset and when ready, run IEBUPDT. At least then it would be easy to see any errors and to easily fix them.
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Sat Dec 18, 2010 12:43 am
Reply with quote

Hey d.sch I did try with a pre-allocated PDS of 100 100 50. It increased the no of members processed to 10 only.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Dec 18, 2010 2:08 am
Reply with quote

Hello,

Quote:
Hey d.sch I did try with a pre-allocated PDS of 100 100 50.

As has been mentioned, nn nn nn tells us nothing. . . Are these cylindars, tracks, blocks. . .

If you look at the info for the dataset, what does this show (for space, lrecl, etc)?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Dec 18, 2010 12:24 pm
Reply with quote

sandy257 wrote:
I understand that whatever I have put as the logic just represents the flow. It may not be syntactically correct since I just want to represent the flow of the REXX routine. I am aware LMADD is actually LMMADD and is preceded by LMPUT.

But I am more interested in knowing why I am getting an Unrecognised I/O error. Is it because of space as in am I facing a space Abend? If so what is the work around? I need to add about 57 members to this PDS and the process is getting terminated after processing certain nos.


Your logic/flow as described stinks. It would be better if you show us the actual code.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Sat Dec 18, 2010 1:06 pm
Reply with quote

Just telling what You are doing will not help to diagnose errors!
You have got to post the real code!

as a general concern it is a bad thing to mix up <technologies>
You have started with the LM***** stuff stay with it, use LMPUT to write records

but since you have given us nothing to work with, very little we can do for help
post the code, the dataset allocation info, dataset DCB above all
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2594
Location: Silicon Valley

PostPosted: Sat Dec 18, 2010 10:13 pm
Reply with quote

Use PROFILE MSGID
and show us any messages you get. Also look in syslog for messages.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Dec 18, 2010 10:58 pm
Reply with quote

What the hell does this mean pedro?
The TS doesnt know to find his hands sitting on them. Or something like that. icon_redface.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sat Dec 18, 2010 11:35 pm
Reply with quote

sandy257 wrote:
Please note that I am allocating the PDS from ISPF not thru REXX. By 50 50 50 I meant 50 Pri, 50 Sec and 50 Dir blk size
As prino said already twice, this means nothing, as long as we don't know if it's 50 cylinders, 50 tracks or 50 blocks!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sun Dec 19, 2010 10:18 am
Reply with quote

Hello,

And while you reply with the space clarification, you should also mention how many records are to be loaded. . .
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Mon Dec 20, 2010 4:45 pm
Reply with quote

Extremely sorry for missing out on such a critical piece of information. All allocations mentioned are in CYLS.

I cannot copy paste the code as I am restricted wrt the policies. But will try to put a better representation of the code
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Mon Dec 20, 2010 4:48 pm
Reply with quote

Records to be loaded are approximately 6500.. to be distributed over 57 members.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Mon Dec 20, 2010 4:50 pm
Reply with quote

we are all wasting time here, if You cannot post Your frigging code,
do not ask on a public forum
solve Your issues inside Your organization...

all You are telling is...

You are allocating something
You do something...
You get some error

do a bit of intelligent thinking please...
how in h*** are we supposed to find out what is wrong there
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Mon Dec 20, 2010 5:17 pm
Reply with quote

Allocated PDS "DSN.PDS" with CYL(100,100) Dir Blk 50 FB LRECL 80
data in DS DSN1 - PS, FB LRECL 133, approximately contains 6500 rows

Objective: To distribute the 6500 rows from DSN1 into 57 members to be stored into DSN.PDS

Code is as follows:
Code:
-------------------------------------------------

/* REXX */

ADDRESS TSO
"ALLOC F(INFILE) DA('DSN1') SHR"
"EXECIO * DISKR INFILE STEM(IN_REC. FINIS"

K = 1

ADDRESS ISPEXEC
"LMINIT DATASET('DSN.PDS') DATAID("D") ENQ(EXCLU)"
"LMOPEN DATAID("D") OPTION(OUTPUT)"

DO I=1 TO IN_REC.0
  IF POS('*01 COPY IDMS',IN_REC.I) > 0 THEN
   DO
     FSTLN = STRIP(SUBSTR(IN_REC.I,51,20))
     PARSE VAR FSTLN COPYBKNM '-' RECLIT
     COPYBKNM = STRIP(COPYBKNM)
     IF I > 1
       DO
         ADDRESS TSO
         LINES = QUEUED()
         "EXECIO " LINES " DISKW COPYF"K
         "EXECIO 0 DISKW COPYF"K" (FINIS"
         DELSTACK
         K = K + 1
       END
     ADDRESS ISPEXEC
     "LMPUT DATAID("D") MODE(INVAR) DATALOC(DATAVAR) DATALEN(80)"
     "LMMADD DATAID("D") MEMBER("COPYBKNM") STATS(NO)"
     ADDRESS TSO
     "ALLOC FI(COPYF"K") DSN('DSN.PDS("COPYBKNM")') SHR REU"
   END
 ELSE
   DO
     VAL1 = SUBSTR(IN_REC.I,19,80)
     ADDRESS TSO
     QUEUE VAL1
   END

"EXECIO 0 DISKW INFILE (FINIS"
"FREE F(INFILE)"

ADDRESS ISPEXEC
"LMCLOSE DATAID("D")"
"LMFREE DATAID("D")"

SAY "COPYBOOK GENERATION SUCCESSFUL"

EXIT

-------------------------------------------------

Please note I had to type out the code from the screen (could not copy paste). If there is a typo that makes it syntactically incorrect please correct the same and proceed (my code does not have any syntax errors as this is working if I use a smaller DS with 100 records).

Please let me know in case u need further information.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Dec 20, 2010 5:50 pm
Reply with quote

Dir Blk 50

how many members do you think can be added to your pds?
OR
how many members do you think your pds can contain?
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Mon Dec 20, 2010 6:03 pm
Reply with quote

Sorry.. max dir blks is 100
Back to top
View user's profile Send private message
sandy257

New User


Joined: 03 Feb 2010
Posts: 19
Location: Pune

PostPosted: Mon Dec 20, 2010 6:26 pm
Reply with quote

I think the max number of members that can be contained in my PDS is 600? Even if the dir blk size is 50; I think it wiuld have accomodated 300 members.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Mon Dec 20, 2010 8:55 pm
Reply with quote

Hello,

Quote:
And while you reply with the space clarification, you should also mention how many records are to be loaded. . .
The allocation information has still not been posted. . .

The best way to get help is to provide requested info on the first request - not the third request.

Suggest you become comfortable with the "Code" tag - this will preserve alignment and inprove readability.

With the tso/ispf editor (not some code), try to create 100 members in your pds and tell us what happens.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Mon Dec 20, 2010 9:00 pm
Reply with quote

still I do not see any need to clobber the script with the LM**** stuff!

the simple flow should be ...
allocate and read the input file

process each record stacking something
when some flag tells
allocate write close free the output dataset
after loop termination
if a dataset write is pending just
allocate write close free the output dataset for the last unprocessed chunk

no need to bother ISPF.
nor to change the DDNAME for the output.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts IEW2315E 1369 Link error All Other Mainframe Topics 3
No new posts Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Error to invoke MPP program through B... IMS DB/DC 3
Search our Forums:

Back to Top