Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

OUTREC - Overlay error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Bhargav_1058

New User


Joined: 13 Dec 2008
Posts: 53
Location: New York

PostPosted: Tue Oct 26, 2010 11:05 am    Post subject: OUTREC - Overlay error
Reply with quote

Hi,

Can you please help me to achieve the below?

I have a VSAM file of Variable length (LRECL=1240).
I want to overlay the 585 position with 'N' and 586 position with '00' if the 1st position is equal to 1.

I have tried the below sort but it gave me syntax error in OUTREC.

Code:
SORT FIELDS=COPY                                           
OUTREC IFTHEN=(WHEN=(5,1,CH,EQ,C'1'),OVERLAY=(589:N,590:00))
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2162
Location: @my desk

PostPosted: Tue Oct 26, 2010 11:11 am    Post subject:
Reply with quote

Should n't it be
Code:
OVERLAY=(589:C'N00'))
Back to top
View user's profile Send private message
Bhargav_1058

New User


Joined: 13 Dec 2008
Posts: 53
Location: New York

PostPosted: Tue Oct 26, 2010 11:35 am    Post subject:
Reply with quote

I tried this but got the VSAM logical error (SORTIN and SORTOUT are the same VSAM file).

Code:
ALTERNATE PARM USED                                           
SYSDIAG= 591180, 1525196, 1525196, 1075617                     
1,028K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,     
   0 BYTES RESERVE REQUESTED, 1,572,280 BYTES USED             
32K BYTES OF EMERGENCY SPACE ALLOCATED                         
SORTIN   : RECFM=V    ; LRECL=  1240; CISIZE =  4096           
OUTREC RECORD LENGTH =  1244                                   
SORTOUT  : RECFM=V    ; LRECL=  1240; CISIZE =  4096           
7,836K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
   0 BYTES RESERVE REQUESTED, 559,544 BYTES USED               
[b]VSAM LOGICAL ERROR 08 ON OUTPUT    [/b]                           
SYNCSMF  CALLED BY SYNCSORT; RC=0000                           
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 26, 2010 11:57 am    Post subject:
Reply with quote

SYNCSORT topics should be posted in the JCL forum
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2162
Location: @my desk

PostPosted: Tue Oct 26, 2010 12:31 pm    Post subject:
Reply with quote

Using the same file as input and output is not advisable. Why dont you write the formatted output to a PS and REPRO it back to your original VSAM file.
Back to top
View user's profile Send private message
Bhargav_1058

New User


Joined: 13 Dec 2008
Posts: 53
Location: New York

PostPosted: Tue Oct 26, 2010 12:34 pm    Post subject:
Reply with quote

Thats absolute!!

When I used a PS file and the same above sort it worked... Thanks a lot for your suggession...
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2162
Location: @my desk

PostPosted: Tue Oct 26, 2010 12:37 pm    Post subject:
Reply with quote

Good to hear its working. icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 26, 2010 3:29 pm    Post subject:
Reply with quote

Since the input is a VSAM file, we use RECORD TYPE=F to tell SORT to process it as fixed-length records, is not it? I've not verified with VSAM files at my end, however, with these messages:
Code:
SORTIN   : RECFM=V    ; LRECL=  1240; CISIZE =  4096           
OUTREC RECORD LENGTH =  1244                                   
SORTOUT  : RECFM=V    ; LRECL=  1240; CISIZE =  4096           
it looks like you need to consider about RDW.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 26, 2010 3:30 pm    Post subject:
Reply with quote

Bhargav_1058 wrote:
(SORTIN and SORTOUT are the same VSAM file).
For a COPY operation, SORT opens the SORTIN and SORTOUT data sets in parallel. So it reads a record from the data set and then writes that record to the same data set. This can result in messing up the data set. It may work sometimes, but it is NOT guaranteed to work. It's risky and should be avoided. On the other hand, for a SORT operation, SORT opens the SORTIN data set, reads all of the records and then closes the SORTIN data set. Then it opens the SORTOUT data set, writes to it and closes it - no parallel processing to mess things up. though, you can still lose the data set if something goes wrong (e.g. an I/O error) so you should have a backup or avoid doing this -- so make your choice!
Back to top
View user's profile Send private message
Bhargav_1058

New User


Joined: 13 Dec 2008
Posts: 53
Location: New York

PostPosted: Tue Oct 26, 2010 6:37 pm    Post subject:
Reply with quote

Anuj,

Thanks for you advice! I have taken a copy of the VSAM file to a VB file. I have used this file for OUTREC OVERLAY instead of the VSAM file in SORTIN and SORTOUT and apart from this I do take a BACKUP.

So, now I will be safe side if there is an I/O error. icon_smile.gif

Thanks again detailed explanation on how sort works.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 26, 2010 9:03 pm    Post subject:
Reply with quote

I hope I had been helpful.

Good Luck icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us