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
 

 

Please explain the PD parameter field under JCL

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

New User


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

PostPosted: Wed Sep 13, 2006 4:11 pm    Post subject: Please explain the PD parameter field under JCL
Reply with quote

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.
Back to top
View user's profile Send private message

gs_chhatwal

New User


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

PostPosted: Wed Sep 13, 2006 4:36 pm    Post subject:
Reply with quote

Please reply me soon as I need to attend Interview
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Wed Sep 13, 2006 6:25 pm    Post subject: Re: Please explain the PD parameter field under JCL
Reply with quote

We have to put the complete length and not the half length.

Thanks,
Muthuvel.
Back to top
View user's profile Send private message
ibmmainframe1

New User


Joined: 26 Jul 2005
Posts: 64
Location: India

PostPosted: Wed Sep 13, 2006 8:34 pm    Post subject:
Reply with quote

pd=packed decimal. sorting comp fields
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: Wed Sep 13, 2006 8:43 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Wed Sep 13, 2006 10:02 pm    Post subject: Re: Please explain the PD parameter field under JCL
Reply with quote

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
Back to top
View user's profile Send private message
gs_chhatwal

New User


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

PostPosted: Thu Sep 14, 2006 10:22 am    Post subject: Thanks a bunch to all or you
Reply with quote

Thanks a lot Muthuvel, Frank and Kiran G R for your valuable information.
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 VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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