Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to sort a VB file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to sort a VB file?
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    Post subject:
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    Post subject:
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: 239
Location: Cincinnati OH USA

PostPosted: Fri Aug 04, 2006 4:02 am    Post subject:
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 Moderator


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

PostPosted: Sat Aug 05, 2006 10:58 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Sun Aug 06, 2006 8:10 pm    Post subject:
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    Post subject: Re: How to sort a VB file?
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 Moderator


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

PostPosted: Mon Aug 07, 2006 9:31 pm    Post subject:
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 Moderator


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

PostPosted: Fri Aug 11, 2006 12:51 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us