MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Un-Packing the PD field based on the Indicator

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
srini_igsi
Beginner


Joined: 12 May 2006
Posts: 41
Topics: 16
Location: Mumbai

PostPosted: Wed Sep 06, 2006 11:40 pm    Post subject: Un-Packing the PD field based on the Indicator Reply with quote

Hi,

I have a Dataset with multiple records with an Indicator based on which I have to Un-pack the PD field. Based on the indicator, the starting and ending position of the PD field will be keep on changing.

Ex: Lest's say that the first byte of each record carries an Indicator.
If the indicator is '1', the PD field starting position may be 10 and ending position 19, if the ind is '2' the PD field starting position may be 21 and ending position 29 ... etc.

How can it be done using DF Sort/Syncsort.

It's urgent.

thanks in advance
_________________
Thanks,
-Srini
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Thu Sep 07, 2006 12:54 am    Post subject: Reply with quote

Srini_igsi,

Can you post a sample of your input records ?
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
srini_igsi
Beginner


Joined: 12 May 2006
Posts: 41
Topics: 16
Location: Mumbai

PostPosted: Thu Sep 07, 2006 3:40 am    Post subject: Reply with quote

Pl observe the following control statements. I'm getting SOC7.

Code:

//SYSIN    DD *                                   
  SORT FIELDS=COPY                               
       OUTFIL IFTHEN=(WHEN=(32,2,CH,EQ,C'08'),   
              OVERLAY=(1,8,PD,TO=BI))             
//*   


If the I/P rec positions 32,33 contains the indicator '08' I have to convert the PD field 1,8 to BI and shud write the same to an output file.
_________________
Thanks,
-Srini
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Sep 07, 2006 7:15 am    Post subject: Reply with quote

srini_igsi,

Your job is failing because your input does not have valid Packed decimal fields. If you populate a PD field with hex zeros, it becomes a PD value with an invalid sign (0) which would explain the S0C7.

You can run VERIFY on the PD fields to see which records have invalid data. Check this DFSORT/ICETOOL link which explains in detail about the VERIFY operator

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/6.16?DT=20050222160456

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Sep 07, 2006 11:41 am    Post subject: Reply with quote

Quote:
If you populate a PD field with hex zeros, it becomes a PD value with an invalid sign (0) which would explain the S0C7.


Actually, you won't get an S0C7 with DFSORT for all binary zeros (X'0000000000000000'). DFSORT treats a 0, 2, 4, 6, 8, A, C, E and F in the sign bit as a positive sign, and 1, 3, 5, 7, 9, B and D as a negative sign. You'd need a bad digit (not 0-9) to get an S0C7 in this situation.

VERIFY will identify values with bad digits.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group