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
 
reformat a VB file in to a different length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Mar 13, 2008 9:44 pm    Post subject: reformat a VB file in to a different length
Reply with quote

I have a file with length 311.
I have to split this file in to 2 separate files based on the key in the first positions.
This is the i/p file
Code:

1234 asdfgfhnmffhnm
3221 SdfaSGfhdgndgnmxfgnh
1234SgfSGhgd
3221asdafasdfs


first o/p file should contain,that is only the records having the KEY value 1234
Code:

1234 asdfgfhnmffhnm
1234SgfSGhgd


second o/p file should have, the records which have the key value
Code:

3221 SdfaSGfhdgndgnmxfgnh
3221asdafasdfs


In my real scenario i have to create 3 o/p files based on the keys. What ever i have shown here is an example only.
I am facing difficulties because of RDW. please help me...
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Mar 13, 2008 9:49 pm    Post subject:
Reply with quote

sorry i missed the main part of my problem...
the output file should have key value at all
the file 1 should look like

Code:

 asdfgfhnmffhnm
SgfSGhgd


file 2 shd look like
Code:

 SdfaSGfhdgndgnmxfgnh
asdafasdfs
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Mar 13, 2008 9:53 pm    Post subject:
Reply with quote

the i/p file format is VB and lrecl is 311
the 1st o/p file is VB and lrecl 50
2nd o/p file is VB and lrecl 90
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 Mar 13, 2008 10:15 pm    Post subject:
Reply with quote

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/311)
//OUT1 DD LRECL=50,DSN=...  output file1 (VB/50)
//OUT2 DD LRECL=90,DSN=...  output file2 (VB/90)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=OUT1,
    INCLUDE=(5,4,CH,EQ,C'1234'),
    BUILD=(1,4,5:9)
  OUTFIL FNAMES=OUT2,
    INCLUDE=(5,4,CH,EQ,C'3221'),
    BUILD=(1,4,5:9)
/*
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Mar 13, 2008 10:56 pm    Post subject:
Reply with quote

I get the error
Code:
OUT1     HAS INCOMPATIBLE LRECL

is there anything to do with NOSOLRF or some thing...
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 Mar 13, 2008 11:05 pm    Post subject:
Reply with quote

That's a Syncsort message.

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Mar 14, 2008 1:53 am    Post subject:
Reply with quote

krisprems,

Try this:
Code:
//SYSIN    DD    *                   
    SORT FIELDS=COPY                 
    OUTFIL FILES=01,                 
      INCLUDE=(5,4,CH,EQ,C'1234'),   
      IFTHEN=(WHEN=(1,2,BI,LT,54),   
      BUILD=(1,4,9)),IFOUTLEN=50,   
      IFTHEN=(WHEN=(1,2,BI,GE,54),   
      BUILD=(1,4,9,46))             
    OUTFIL FILES=02,                 
      INCLUDE=(5,4,CH,EQ,C'3221'),   
      IFTHEN=(WHEN=(1,2,BI,LT,94),   
      BUILD=(1,4,9)),IFOUTLEN=90,   
      IFTHEN=(WHEN=(1,2,BI,GE,94),   
      BUILD=(1,4,9,86))     
/*
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Mar 14, 2008 1:56 am    Post subject:
Reply with quote

krisprems,

Please note, if you are using my control cards as is, you'll need to change the OUT1 and OUT2 DDs to SORTOF01 and SORTOF02.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Mar 14, 2008 1:29 pm    Post subject:
Reply with quote

Thanks Frank and Alissa.
Alissa: i used ur sort card, it worked for me...
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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