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

SyncSort card required to expand in between field of a file.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 02, 2008 9:28 am
Reply with quote

Hello,

Plewase do not double-post the same question. The other topic has been removed.

You are getting slow turnaround because you are not posting the necessary info for the people who are avaiable. When an attempt is not successful, you need to post the jcl, the control statements, and the informational messages including their message id. If you get undesirable output, you need to post some of the "bad" output. When you post these details, use copy/paste and Preview. When you are satisfied that your post is as you want, Submit.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Oct 02, 2008 5:12 pm
Reply with quote

Ajay,

The below card should work for you. If not, you need to post some of your input data with file-positions.
Code:
//STEP1    EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=Input  VB,LRECL=2123
//SORTOUT  DD DSN=Output VB,LRECL=2127
//SYSIN    DD *
  SORT FIELDS=COPY
  OUTREC BUILD=(1,2112,4X,2113)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 02, 2008 8:34 pm
Reply with quote

Quote:
what happens when you encounter short records ?


The OP said he wanted to insert 4 spaces in the middle of the record. To me that implies that there aren't any short records up to that point. If there are, then what does it mean to insert 4 spaces for the short records? Does that mean the short records should be padded with blanks up to and including the 4 spaces or what? If padding is required, then an IFTHEN WHEN=INIT clause could be used. If padding is not required, then IFTHEN WHEN=(cond) clauses could be used to handle the short records and non-short records differently.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 02, 2008 8:42 pm
Reply with quote

I assumed that when the OP mentioned 2108 he was counting the RDW, so I suggested:

Code:

  OUTREC BUILD=(1,2108,4X,2109)


If the OP was not counting the RDW (which well may be the case), then it would be:

Code:

  OUTREC BUILD=(1,2112,4X,2113)



as Arun suggested.

I really wish people who use this Forum would learn how to describe their requirements correctly. It gets really tedious having to guess at what people want.

A perfect example is:

Quote:
Hi Frank,

It does not seems to be working.

Thanks
Ajay


How is anyone expected to help given that little piece of non-information.

Sheesh.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 02, 2008 8:47 pm
Reply with quote

Quote:
When I'm running the job with below sysin:

//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(5,2112,2117:2113,11)
/*

I'm getting an abend : outrec RDW not included.


Unbelievable. You ignored everything everyone said in this thread!

You don't include the RDW and get an error message saying you didn't include it and still can't figure out that you didn't include it.

The message indicates you're using Syncsort, so I'll drop out now. Good luck (you'll need it).
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Oct 02, 2008 10:34 pm
Reply with quote

ajay_udl,

For a VB file, you must include the RDW (1,4) in your OUTREC statement. Please make the necessary change to include the RDW, as suggested by multiple people in this thread and then let us know if it works as desired. If there is still a problem, please post your JCL AND the sysout messages so that we can properly assist you further.
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 -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top