Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Syncsort - How to Numberic to PD using sort card

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

New User


Joined: 20 Sep 2006
Posts: 23
Location: Chennai

PostPosted: Sun May 20, 2012 3:56 pm    Post subject: Syncsort - How to Numberic to PD using sort card
Reply with quote

Hi,
Input file contains 1st 6 byte as numeric, I want to read it and convert into packed decimal (comp-3).
I tried to convert in sort by using below code. I worked fine but expected values in sign byte 'C' but i am getting 'F in hex values.’
Can someone guide me on this?

Code:OPTION COPY
OUTREC OVERLAY=(1,6,FS,TO=PD,LENGTH=4)

Input file:
100111abc...

Output file (hex format)
1011
011F

Excepted is
1011
011C
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun May 20, 2012 9:32 pm    Post subject: Reply to: How to Numberic to PD using sort card
Reply with quote

Have a look in the manual to confirm, then try TO=PDC
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon May 21, 2012 11:56 pm    Post subject:
Reply with quote

D.Senthil kumar.

DFSORT would give you a C sign with TO=PD, so if you're getting an F sign, I can only conclude that you're using Syncsort (WER messages), not DFSORT (ICE messages).

This is the DFSORT Forum for DFSORT questions. Please use the JCL Forum for Syncsort questions.
Back to top
View user's profile Send private message
senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Wed May 23, 2012 1:40 pm    Post subject: Reply to: How to Numberic to PD using sort card
Reply with quote

Hi,
Please try the below code:
Code:
//STEP1    EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SYSPRINT DD SYSOUT=*                                                 
//SORTIN DD *                                                           
452921                                                                   
351052                                                                   
260114                                                                   
623460                                                                   
812325                                                                   
352328                                                                   
//SORTOUT  DD DSN=XXXX.TEST.PDVALUES,DISP=(,CATLG,DELETE),           
//            UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)                         
//SYSIN DD *                                                           
  OPTION COPY                                                           
  OUTREC FIELDS=(1,5,UFF,TO=PD) 


Copybook Layout:

Code:
****** ***************************** Top of Data ************
000001        01 OUTREC.                                       
000002           05 FIELD1   PIC 9(4)V99 COMP-3.             
****** **************************** Bottom of Data **********


u will get the excepted output.Next time onwards,Please post in the correct section.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed May 23, 2012 1:49 pm    Post subject:
Reply with quote

sorry if this sort-rookie poses a question,
but
if the input is 6 char
Code:
//SORTIN DD *                                                           
452921           


how does this work?

Code:
OUTREC FIELDS=(1,5,UFF,TO=PD)


why would it not be
Code:
OUTREC FIELDS=(1,6,UFF,TO=PD)


or does syncsort have its own method of doing things?
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed May 23, 2012 8:43 pm    Post subject:
Reply with quote

Hello,

Syncsort is similar to DFSORT in many (most) control statements - though there are some cases where the "same" functionality has somewhat different syntax.

Yup, i believe the 1,6 is correct (rather than the 1,5).
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us