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
 

 

Combining, convert of FB to VB and specifying OUTREC on FB

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

New User


Joined: 08 Jun 2006
Posts: 45
Location: Trumbull, CT

PostPosted: Wed May 16, 2007 4:54 pm    Post subject: Combining, convert of FB to VB and specifying OUTREC on FB
Reply with quote

Hi All,

I have a VB file with LRECL=300. The minimum record length in the dataset is 46. I need to filter on the condition in the dataset at 13th position to be '030'. And on these records I need this specific OUTREC. OUTREC FIELDS=(1,12,36,16). I need my output file to be in FB format.

For getting my above work done i have used two sort steps.
Step 1. For converting the 300 length VB file to 304 length FB file by
Code:
 SORT FIELDS=COPY                                     
  OUTFIL FNAMES=SORTOUT1,VTOF,                         
  OUTREC=(1:1,304)                                     
  END                           


Step 2. For getting my output in needed format.

Code:
SORT FIELDS=(40,16,CH,A,5,12,CH,A)                   
    SUM FIELDS=NONE                                     
    INCLUDE COND=(17,3,BI,EQ,X'F0F3F0')                 
    OUTREC FIELDS=(5,12,40,16)


So I am using two sort steps(one for converting VB to FB & other for getting the desired output in FB) for a single work. I believe we can do this in one single sort step or ICETOOL step.

I searched through the forum but not able to find a solution.

Can anyone help me out?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed May 16, 2007 5:02 pm    Post subject:
Reply with quote

Why not use the VTOF in the second sort and do not process the first sort.

I don't have MF access today, so can not get to my library with the correct code in. I will try to later.
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: Wed May 16, 2007 9:02 pm    Post subject:
Reply with quote

kaleelahamed,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/300)
//SORTOUT1 DD DSN=...  output file (FB/28)
//SYSIN    DD    *
    OPTION VLSHRT
    INCLUDE COND=(17,3,CH,EQ,C'030')
    SORT FIELDS=(40,16,CH,A,5,12,CH,A)
    SUM FIELDS=NONE
    OUTFIL FNAMES=SORTOUT1,VTOF,
      BUILD=(5,12,40,16)
/*
Back to top
View user's profile Send private message
kaleelahamed

New User


Joined: 08 Jun 2006
Posts: 45
Location: Trumbull, CT

PostPosted: Thu May 17, 2007 12:59 pm    Post subject:
Reply with quote

Thanks for the code..Its working fine.

Can ICETOOL do this job?
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 May 17, 2007 7:55 pm    Post subject:
Reply with quote

Yes, you can do the same thing with DFSORT's ICETOOL rather than with DFSORT directly like this:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file (VB/300)
//SORTOUT1 DD DSN=...  output file (FB/28)
//TOOLIN   DD    *
SORT FROM(IN) TO(SORTOUT1) USING(CTL1)
//CTL1CNTL DD *
    OPTION VLSHRT
    INCLUDE COND=(17,3,CH,EQ,C'030')
    SORT FIELDS=(40,16,CH,A,5,12,CH,A)
    SUM FIELDS=NONE
    OUTFIL FNAMES=SORTOUT1,VTOF,
      BUILD=(5,12,40,16)
/*
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 How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am
No new posts help: convert C'00AB' to X'00AB' alan_gu DFSORT/ICETOOL 1 Thu Sep 29, 2016 12:22 pm


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