Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
gs_chhatwal

New User

Joined: 19 Jul 2006
Posts: 3
Location: New Delhi

 Posted: Wed Sep 13, 2006 4:11 pm    Post subject: Please explain the PD parameter field under JCL Could anybody explain SORT FIELDS=(21,12,PD,A) Under the second parameter of fields do we need to put exact lenght of the field or we need to do half of the field i.e. PIC S9(12) COMP - 3? Please explain.

gs_chhatwal

New User

Joined: 19 Jul 2006
Posts: 3
Location: New Delhi

 Posted: Wed Sep 13, 2006 4:36 pm    Post subject: Please reply me soon as I need to attend Interview
muthuvel

Active User

Joined: 29 Nov 2005
Posts: 217
Location: Chennai

 Posted: Wed Sep 13, 2006 6:25 pm    Post subject: Re: Please explain the PD parameter field under JCL We have to put the complete length and not the half length. Thanks, Muthuvel.
ibmmainframe1

New User

Joined: 26 Jul 2005
Posts: 64
Location: India

 Posted: Wed Sep 13, 2006 8:34 pm    Post subject: pd=packed decimal. sorting comp fields
Frank Yaeger

DFSORT Moderator

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

Posted: Wed Sep 13, 2006 8:43 pm    Post subject:

 Quote: Could anybody explain SORT FIELDS=(21,12,PD,A)

This is a DFSORT statement to sort a 12-byte PD (packed decimal) field starting in position 21 in ascending order. A 12-byte PD field looks like this in hexadecimal:

 Code: ddddddddddddddddddddddds

where each d is 0-9 and s is the sign (usually C or F for positive or D for negative). Note that the value has 23 digits.

 Quote: Under the second parameter of fields do we need to put exact lenght of the field or we need to do half of the field i.e. PIC S9(12) COMP - 3? Please explain.

The length of a PIC S9(n) COMP-3 field is actually (n/2)+1. So a PIC S9(12) COMP-3 field has a length of 7, not 12. A 7-byte PD field looks like this in hexadecimal:

 Code: ddddddddddddds

Note that the value has 13 digits. For an S9(12) COMP-3 field, the leading digit would be 0.

So you would use 21,7,PD,A.

For a table showing the relationship between COBOL data types and DFSORT formats, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/C.3?DT=20060615185603
kgumraj

Active User

Joined: 01 May 2006
Posts: 151

 Posted: Wed Sep 13, 2006 10:02 pm    Post subject: Re: Please explain the PD parameter field under JCL Why you are using PIC its a cobol systax, JCL doesn't have the variables for your another question SORT FIELDS=(21,12,PD,A) Sort from 21 position to a length of 12 which is in packed decimal (Comp-3 for your ref) in acending order
gs_chhatwal

New User

Joined: 19 Jul 2006
Posts: 3
Location: New Delhi

 Posted: Thu Sep 14, 2006 10:22 am    Post subject: Thanks a bunch to all or you Thanks a lot Muthuvel, Frank and Kiran G R for your valuable information.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us