View previous topic :: View next topic
|
Author |
Message |
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
My Input file VB and below is a part
Code: |
00000135{00136834377556067773{ 0012157000E0010F7301466
00002493I00147615327566067773{ 0012157000E0010F7301467
00001968E00129025045276067773{ 0012157000E0010F7301468
00000000{00149848317586067773{ 0012157000E0010F7301469
00000079B00151732779609967873{ 0012157000E0010F7302429 |
I want the output like below
Code: |
00000135{00136834377556067773{ 0012157000E0010F7301466 |
I tried the below and didnt work and i know the positions are correct
Code: |
SORT FIELDS=COPY
INCLUDE COND=(13,18,PD,EQ,368343775560677730) |
Thanks |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
1. Your starting byte would be 17 for a VB file, not 13.
2. Your display shows zoned decimal numbers while your SORT statement references packed decimal numbers. I think you first need to figure out what you have in the file. |
|
Back to top |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
Thanks for the help. Even if i put ZD instead of PD, i am able to not retrieve the record wanted.
this is what i have in the file.
Code: |
00001968E00129025045276067773{ 0012157000E0010F7301468
FFFFFFFFCFFFFFFFFFFFFFFFFFFFFC4FFFFFFFFFFCFFFFCFFFFFFF444444444444444444
000019685001290250452760677730000121570005001067301468000000000000000000
-----------------------------------------------------------------------
00000000{00149848317586067773{ 0012157000E0010F7301469
FFFFFFFFCFFFFFFFFFFFFFFFFFFFFC4FFFFFFFFFFCFFFFCFFFFFFF444444444444444444
000000000001498483175860677730000121570005001067301469000000000000000000
-----------------------------------------------------------------------
00000079B00151732779609967873{ 0012157000E0010F7302429
FFFFFFFFCFFFFFFFFFFFFFFFFFFFFC4FFFFFFFFFFCFFFFCFFFFFFF444444444444444444
000000792001517327796099678730000121570005001067302429000000000000000000
-----------------------------------------------------------------------
00000013E00153839123249967873{ 0012157000E0010F7302430
FFFFFFFFCFFFFFFFFFFFFFFFFFFFFC4FFFFFFFFFFCFFFFCFFFFFFF444444444444444444
000000135001538391232499678730000121570005001067302430000000000000000000
----------------------------------------------------------------------- |
"not" added as per later post |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Your last post is contradicting itself -- "even if" and "am able" don't agree; did you or did you not get what you wanted? If not, did you change the starting position in your INCLUDE statement? VB files have a 4-byte record descriptor word before each record, and you must take that word into account when specifying your sort column. |
|
Back to top |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
sorry my bad. missed the not. Still NOT able to retrieve the record. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Post the JCL you are using and make sure to include the SORT statements. Post the output for this job as well. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Odd behavior for such a simple task
just checked with
Code: |
****** ***************************** Top of Data ******************************
......
000004 //S1 EXEC PGM=ICEMAN
000005 //SYSOUT DD SYSOUT=*
000006 //SORTIN DD *
000007 00000135{00136834377556067773{ 0012157000E0010F7301466
000008 00002493I00147615327566067773{ 0012157000E0010F7301467
000009 //SORTOUT DD SYSOUT=*,
000010 // DCB=(RECFM=FB,LRECL=80)
000011 //SYSIN DD *
000012 SORT FIELDS=COPY
000013 INCLUDE COND=(13,18,ZD,EQ,368343775560677730)
****** **************************** Bottom of Data **************************** |
Code: |
********************************* TOP OF DATA **********************************
00000135{00136834377556067773{ 0012157000E0010F7301466
******************************** BOTTOM OF DATA ******************************** |
|
|
Back to top |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
Below is the code
Code: |
//PXXXXXS JOB (DBII,UPDT,IBS),'ACCOUNT',
// MSGCLASS=X,CLASS=1,
// NOTIFY=&SYSUID
//*
//PS015A EXEC PGM=SORT,REGION=8M
//SORTIN DD DISP=SHR,DSN=HLQ.PXXXXX.SAMPLE
//SORTOUT DD DSN=HLQ.PXXXXX.SAMPLE.A,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(5,1),RLSE),UNIT=TESTCI,
// DCB=*.SORTIN
//SORTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(17,18,ZD,EQ,368343775560677730)
//* |
Output file HLQ.PXXXXX.SAMPLE.A is empty. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
You did not care to post the output ( jes and sort messages ) |
|
Back to top |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
JESMSGLG is below.
Code: |
21.16.37 J0001539 DTM4750I JOB CPU LIMITED TO 1:00
21.16.37 J0001539 ICH70001I P10832 LAST ACCESS AT 21:16:16 ON WEDNESDAY, APRI
21.16.37 J0001539 $HASP373 PXXXXXS STARTED - INIT 3 - CLASS 1 - SYS SYSB
21.16.37 J0001539 IEF403I P108329S - STARTED - TIME=21.16.37
21.16.37 J0001539 - -----TIMINGS (MINS.)--
21.16.37 J0001539 -STEPNAME PROCSTEP RC EXCP CONN TCB SRB C
21.16.37 J0001539 -PS015A 00 50 14 .00 .00
21.16.37 J0001539 IEF404I P108329S - ENDED - TIME=21.16.37
21.16.37 J0001539 -PXXXXXS ENDED. NAME-ACCOUNT TOTAL TCB CPU TIM
21.16.37 J0001539 $HASP395 P108329S ENDED
------ JES2 JOB STATISTICS ------
10 APR 2013 JOB EXECUTION DATE
18 CARDS READ
86 SYSOUT PRINT RECORDS
0 SYSOUT PUNCH RECORDS
5 SYSOUT SPOOL KBYTES
0.00 MINUTES EXECUTION TIME |
|
|
Back to top |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
sysout is below
Code: |
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(17,18,ZD,EQ,368343775560677730)
WER276B SYSDIAG= 1784483, 5046061, 5046061, 4606800
WER164B 8,884K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,364K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 8000
WER073I SORTIN : DSNAME=HLQ.PXXXXX.SAMPLE
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER074I SORTOUT : DSNAME=HLQ.PXXXXX.SAMPLE.A
WER410B 7,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 2,188K BYTES USED
WER055I INSERT 0, DELETE 7
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER416B SORTIN : EXCP'S=1,UNIT=3390,DEV=861E,CHP=(08732416DB58,1),VOL=TSTD
WER416B SORTOUT : EXCP'S=0,UNIT=3390,DEV=8714,CHP=(08732416DB58,1),VOL=TST2
WER416B TOTAL OF 1 EXCP'S ISSUED FOR COPYING
WER054I RCD IN 7, OUT 0
WER169I RELEASE 1.4 BATCH 0520 TPF LEVEL 0.1
WER052I END SYNCSORT - P108329S,PS015A,,DIAG=EE00,71C8,C208,004E,A6E6,48C3,0 |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Your input isn't VB. It is FB, 80, with a blocksize of 8000. Try taking four bytes off the start position. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
unfortunately at this point there is very little that can be done from here
I run this
Code: |
****** ***************************** Top of Data ******************************
......
000004 //S1 EXEC PGM=ICEMAN
000005 //SYSOUT DD SYSOUT=*
000006 //SORTIN DD DISP=SHR,DSN=ENRICO.SORT.VB1
000007 //SORTOUT DD DISP=SHR,DSN=ENRICO.SORT.VB2
000008 //SYSIN DD *
000009 SORT FIELDS=COPY
000010 INCLUDE COND=(17,18,ZD,EQ,368343775560677730)
****** **************************** Bottom of Data **************************** |
where ...VB1 contains the two records from my previous test
and as expected ...VB2 contains the selected record
check for the umpteen time the input data, the ball is again in Your court now.
looks like the TS has things mixed up quite a bit,
probably he keeps changing the testing environment
if the files are FB why it did not work the first time ??? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Because at first PD was specified as well as the "correct" start position, then both were changed at the same time :-) |
|
Back to top |
|
|
PrabakarV
New User
Joined: 21 Dec 2007 Posts: 88 Location: My Desk
|
|
|
|
Thanks a lot. Just followed this post and found out where i was stupid. Used below code and it working perfectly. I totally missed the fact my field is stored as S9(18) COMP-3 which 10 bytes instead 18.
http://ibmmainframes.com/about48339.html
Code: |
SORT FIELDS=COPY
INCLUDE COND=(590,10,PD,EQ,368343775560677730) |
URL fixed |
|
Back to top |
|
|
|