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
 

 

Syncsort - Sort on VBA dataset - consideration for RDW?

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

New User


Joined: 23 Sep 2008
Posts: 2
Location: Chicago

PostPosted: Tue Sep 23, 2008 10:56 pm    Post subject: Syncsort - Sort on VBA dataset - consideration for RDW?
Reply with quote

Hi,

Iam facing issue with Syncsort on VBA dataset.

My input dataset is a VBA and its Record Length is 137. The first 5 bytes of the input dataset has a packed decimal. I need to convert this PD bytes to a readable format and copy the whole record into a new output VBA dataset. The LRECL of the new output dataset is 146. I used a couple of SORT cards, still Iam getting error. Please help.

1.
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,5,PD,M26,SIGNS=(,-),10,128)

---> gives the error "OUTPUT LRECL DIFFERS FROM SORTOUT. LRECL
OUTREC - SHORT RECORD"

2. SORT FIELDS=COPY
OUTREC FIELDS=(5,5,PD,M26,SIGNS=(,-),10,128)
---> gives the error "OUTREC RDW NOT INCLUDED"

Thanks,
Viki
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 23, 2008 11:20 pm    Post subject: Re: Sort on VBA dataset - consideration for RDW?
Reply with quote

Vignesh Balaji wrote:
"OUTPUT LRECL DIFFERS FROM SORTOUT. LRECL
OUTREC - SHORT RECORD"
What is the lrecl specified on the SORTOUT DD?
Back to top
View user's profile Send private message
Vignesh Balaji

New User


Joined: 23 Sep 2008
Posts: 2
Location: Chicago

PostPosted: Wed Sep 24, 2008 1:16 am    Post subject:
Reply with quote

The LRECL of the SORTOUT dataset is 146...
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed Sep 24, 2008 12:42 pm    Post subject:
Reply with quote

Vignesh,

The below Syncsort job will do what you are trying to achieve. Try this and get back if you find any issues.

Code:
//STEP00   EXEC PGM=SORT                             
//SORTIN   DD DSN=Input-File  -----------VBA,LRECL=137
//SORTOUT  DD DSN=Output-File -----------VBA,LRECL=142
//SYSOUT   DD SYSOUT=*                               
//SYSIN    DD *                                       
  INREC BUILD=(1,5,6,5,PD,M26,LENGTH=10,11)           
  OPTION COPY                                         

PS: M26 has a predefined length of 16 (including sign), but as your input PD field is only of 5 bytes, you will get a maximum of only 9 numeric digits in the output and one byte for the sign and that makes a length of 10. Hence for an input LRECL of 137, you can have an output LRECL of just 142.
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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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