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
 
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 records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm

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