IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to sort a VB file?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Thu Aug 03, 2006 4:53 pm
Reply with quote

why 25128 followed by 25100?
the parameter is below
000021 //SYSIN DD *
000022 SORT FIELDS=(5,5,CH,A)
000023 END
000024 /*
the result is below
000017 2512500000000000
000018 2512800000000000
000019 j 2510045600000000
000020 j 2510045600000000


000028 j 2512845700000000
000029 2510045600000000
000030 2510045600000000
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Thu Aug 03, 2006 4:55 pm
Reply with quote

the result is below
000017 2512500000000000
000018 2512800000000000
000019 j 2510045600000000
000020 j 2510045600000000


000028 j 2512845700000000
000029 2510045600000000
000030 2510045600000000
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Fri Aug 04, 2006 12:43 am
Reply with quote

william,

It seems you only show us your output. It could easier for us to help you to also show us a complete example of you I/O files and put them between ubb codes.

Alain
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Aug 04, 2006 4:02 am
Reply with quote

if your sample data does not include the rec length, try (9,5,ch,a)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Aug 05, 2006 10:58 pm
Reply with quote

Quote:
why 25128 followed by 25100?


Well, 25100 appears to have a j before the number. It's impossible to tell what your input really looks like from what you posted. Try using this DFSORT job to display your input data in hex so you/we can see what it really looks like:

Code:

//SHOW EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
   OPTION COPY
   OUTREC FIELDS=(1,4,1,4,HEX,5,HEX)
/*
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Sun Aug 06, 2006 12:14 pm
Reply with quote

Dave,I think maybe the first two byes is the length of the record,but i don't know what the 3rd and 4th byte mean.

Yaeger,I can't connect to the mainframe in home,i will try to use your code tomorrow
I had typed in HEX in command line before and get the result displayed in hex mode.

000017 2512500000000000
0300FFFFFFFFFFFFFFFF
08002512500000000000
------------------------------------
000018 2512800000000000
0300FFFFFFFFFFFFFFFF
08002512800000000000
------------------------------------
000019 j 2510045600000000
0900FFFFFFFFFFFFFFFF
01002510045600000000
------------------------------------
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun Aug 06, 2006 8:10 pm
Reply with quote

Your hex display seems to show the following VB records:

Code:

 Length
Hex Dec Data
 38  56 2512500000000000...
 38  56 2512800000000000...
 91 145 2510045600000000...


The RDW is in positions 1-4 and the Data starts in position 5.

When I use DFSORT to sort these input records with:

Code:

  SORT FIELDS=(5,5,CH,A)     


I get the following output:

Code:

 Length
Hex Dec Data
 91 145 2510045600000000...
 38  56 2512500000000000...
 38  56 2512800000000000...


Note that 25100 is first.

The results you show don't actually look like they've been sorted so I might guess that you're actually doing a COPY rather than a SORT. Perhaps you're overriding the SYSIN control statements you show with control statements from another source (like DFSPARM).

Please show us your //SYSOUT DD output so we can see what's really going on.
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Mon Aug 07, 2006 12:16 pm
Reply with quote

below is the SYSOUT

ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 14:16 ON MON AUG
SORT FIELDS=(5,5,CH,A)
END
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 4 ZSORT07J.STEP002 . , INPUT LRECL = 1178, BLKSIZE = 7680, TYPE = V
ICE093I 0 MAIN STORAGE = (MAX,4194304,4194304)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (4125672,4125672)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16
ICE128I 0 OPTIONS: SIZE=4194304,MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=(SYSDA ,004),ABCODE=MSG
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB1
ICE131I 0 OPTIONS: TMAXLIM=4194304,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT
ICE084I 1 VSAM ACCESS METHOD USED FOR SORTIN
ICE090I 0 OUTPUT LRECL = 1178, BLKSIZE = 27998, TYPE = VB
ICE080I 0 IN MAIN STORAGE SORT
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 13, OUT: 13
ICE134I 0 NUMBER OF BYTES SORTED: 2371
ICE098I 0 AVERAGE RECORD LENGTH = 182 BYTES
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 0 , TRACKS USED: 0
ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES
ICE188I 0 DATA SPACE STORAGE USED = 16K BYTES
ICE052I 0 END OF DFSORT

the result
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Aug 07, 2006 9:31 pm
Reply with quote

Something is missing here. Your SORTIN is VSAM, but you are treating it as V, so 5,5,CH,A should work. I can't say offhand what's happening.

Please post the complete JCL for the job you're running.

Also, please run this job with the VSAM data set as SORTIN and show the SORTOUT output:

Code:

//SHOWIN EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   
//SORTOUT DD SYSOUT=*
//SYSIN DD *
   OPTION COPY
   RECORD TYPE=V
   OUTREC FIELDS=(1,4,1,4,HEX,5,HEX)
/*


and run this job with your output data set as SORTIN and show the SORTOUT output:

Code:

//SHOWOUT EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... 
//SORTOUT DD SYSOUT=*
//SYSIN DD *
   OPTION COPY
   OUTREC FIELDS=(1,4,1,4,HEX,5,HEX)
/*


If you like, you can send me the information offline (yaeger@us.ibm.com) instead of posting it here. If you do, please put "DFSORT" somewhere in your Subject line to catch my attention.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Aug 11, 2006 12:51 am
Reply with quote

I worked with William offline to figure this one out. It turns out his VSAM input file has an embedded RDW in the first 4 bytes, so the value he wants to sort is actually in bytes 5-8 of the data rather than in bytes 1-4 of the data. Therefore, when treating the VSAM data set as VB, the needed SORT statement is:

Code:

  SORT FIELDS=(9,5,CH,A)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top