Posted: Fri Aug 03, 2007 1:57 pm Post subject: Extract record based on packed decimal format
hi,
I have a requirment, i need to extract record form the production file.
I have been given the key of the record to be extacted in charter format .
They want me to do it thru file aid(As only few records).
I want to do it in sort.
The problem is the key fields are in packed decimal format in
production and i have it in char format.
i was trying to use joinkeys and because the length does not match it was
giving me error .
the position of key in production Start postion 7 leng 5, start ps 12 leng 4
the input key i have is like following 1st key 020070730 2nd key 4000017
Could you please post some samples of the production file and of the keys of the records to be extracted?
I dint get what you exactly you want.
The record is too huge 1800 byte Fb.
and the key is in packed decimal format as i told you.
its basicaly a date followed by serial number
My doubt is how can I compare the packed decimal format key to that of a char format.
Yes you are right.
My input is also a file so I am using join keys
Code:
//STEP40 EXEC PGM=SORT
//SORTJNF1 DD *
0200707304000017 (would be file inturn)
//SORTJNF2 DD DSN=PMSG.RGWB131.STIFOUT.EARLY.BKUP(-3),DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,5,A,6,4,A) how do i code this
JOINKEYS FILE=F2,FIELDS=(7,5,A,12,4,A)
REFORMAT FIELDS=(F2:1,1008)
SORT FIELDS=COPY
/*
//SYSOUT DD SYSOUT=X
//SYSPRINT DD SYSOUT=X
how do i code join key for first file
JOINKEYS FILE=F1,FIELDS=(1,5,A,6,4,A)
JOINKEYS FILE=F1,FIELDS=(1,9,A,10,7,A) first 9 is date ad rest 7 are serial no.
but in my production file the same data is stored in comp3 packed decimal format.
so the joinkeys
JOINKEYS FILE=F2,FIELDS=(7,5,A,12,4,A)
9(9) comp3 5bytes and 9(7) comp3 4 bytes
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Sat Aug 04, 2007 7:35 am Post subject:
Aswin,
why do you need a JOIN operator for such a simple include job? you just need symbols statements and then you can use them in the next step. Here try this . The first step creates 2 symbols from the file with the character data. The next step uses these 2 values and extracts the desired records.
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