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
 

 

Sorting VB File with PD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Thu Feb 14, 2008 2:05 pm    Post subject: Sorting VB File with PD
Reply with quote

I have a VB file where a field is S9(9) comp-3 starting at byte 44.

I need to pull records based on the first 3 digits (of value 040) of the comp-3 variable.

How can I do this?

Thanks,
Raghav
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Feb 14, 2008 3:22 pm    Post subject:
Reply with quote

Either unpack the data or use one of DFSORT's the sub-field formats.
Have you looked at the manual?
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Thu Feb 14, 2008 3:25 pm    Post subject:
Reply with quote

Hi raghavendra_p_sarvade,
Quote:
I have a VB file where a field is S9(9) comp-3 starting at byte 44

Including RDW, Is 44th column, the starting position for a field S9(9) comp-3?
Quote:
I need to pull records based on the first 3 digits (of value 040) of the comp-3 variable.

Please check with the following code for your requirement.
Code:
// EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INFILE,DISP=SHR
//SORTOUT DD DSN=OUTFILE,DISP=....
//SYSIN DD *
 OPTION COPY
 INCLUDE COND=((44,5,PD,GE,+040000000,AND,44,5,PD,LE,+040999999),OR,
 (44,5,PD,GE,-040999999,AND,44,5,PD,LE,-040000000))
/*
//

Thanks,
Shankar
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: Thu Feb 14, 2008 9:22 pm    Post subject:
Reply with quote

Here's an easier way to do it with DFSORT:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//SORTOUT DD DSN=...  output file (VB)
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(44,2,BI,EQ,B'000001000000....')
/*
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 How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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