Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort on hex value, while copying from VB to FB

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

New User


Joined: 29 Aug 2008
Posts: 10
Location: Bangalore

PostPosted: Fri Mar 29, 2013 1:30 pm    Post subject: Sort on hex value, while copying from VB to FB
Reply with quote

I am trying to copy a few records from a VB file to a FB file by including some conditions. In the sort card, I am using this:

Code:
OPTION COPY                                               
OUTFIL FNAMES=SORTOUT,VTOF,INCLUDE((10,3,CH,EQ,C'PHD',OR, 
                    18,3,CH,EQ,C'PHD',OR,                 
                    10,3,CH,EQ,C'PHH',OR,                 
                    18,3,CH,EQ,C'PHH',OR,                 
                    10,3,CH,EQ,C'PHJ'),AND,               
                   (1,1,CH,EQ,X'AD'))                   
But I am not able to see the records that have AD (hex) in the first position of the VB file copied into the FB file. The job runs successfully but its not copying the records that have AD in the first position. Please help.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 29, 2013 1:37 pm    Post subject:
Reply with quote

As far as I can make out of your post, you should change this
Code:
(1,1,CH,EQ,X'AD'))
to
Code:
(5,1,CH,EQ,X'AD'))


Hopefully, RDW was considered for other sort statements.

PS.: Please learn to use BBcode Tags, I've edited your post to add them.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 29, 2013 1:42 pm    Post subject:
Reply with quote

Though I've edited your post but the original Sort statements were missing "=" after INCLUDE so I did not add that. Hopefully, that's a typo from your side.
Back to top
View user's profile Send private message
manigadu

New User


Joined: 29 Aug 2008
Posts: 10
Location: Bangalore

PostPosted: Fri Mar 29, 2013 1:54 pm    Post subject:
Reply with quote

Thank you Anuj, It worked, and also I understand I have to use 14,3,CH,EQ,C'PHD' instead of 10,3,CH,EQ,C'PHD'. because we have to consider RDW
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 29, 2013 2:06 pm    Post subject:
Reply with quote

Glad you got it working - Thanks for the feedback.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Mar 29, 2013 2:13 pm    Post subject: Re: Sort on hex value, while copying from VB to FB
Reply with quote

I don't know if it is just me, but this I find much easier to read. Not only change the 1 and 10, but the 18 as well.

Code:
OPTION COPY                                               
OUTFIL FNAMES=SORTOUT,
       VTOF,
       INCLUDE=((5,1,CH,EQ,X'AD')
               AND,               
                (14,3,CH,EQ,C'PHD',
                OR, 
                 22,3,CH,EQ,C'PHD',
                OR,                 
                 14,3,CH,EQ,C'PHH',
                OR,                 
                 22,3,CH,EQ,C'PHH',
                OR,                 
                 14,3,CH,EQ,C'PHJ'))                   
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat Mar 30, 2013 1:59 am    Post subject: Reply to: Sort on hex value, while copying from VB to FB
Reply with quote

Ideally I would move the INCLUDE cards to the input phase so that you would read less number of records. You also need to provide the position and length when using VTOF. try the following control cards.

Code:

//SYSIN    DD *                                     
  OPTION COPY,VLSCMP                               
  INCLUDE COND=(5,1,CH,EQ,X'AD',AND,               
                (14,3,SS,EQ,C'PHD,PHH,PHJ',OR,     
                 22,3,SS,EQ,C'PHD,PHH'))           
                                                   
  OUTFIL VTOF,BUILD=(5,n)

**  where n = your vb lrecl - 4                         
//*
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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us