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
 

 

Syncsort - Remove spaces in mid of field and realign

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

New User


Joined: 28 Dec 2010
Posts: 25
Location: Chennai

PostPosted: Fri Mar 11, 2011 4:14 pm    Post subject: Syncsort - Remove spaces in mid of field and realign
Reply with quote

Hi

I/p File : VB
O/p File : FB LRECL = 38

My input file is like:

Code:
ABCD 1234567 2004-12-31 KI1
AGCD 12 2004-12-31 KI1
ASCD 123 2004-11-31 KI1
ABGD 1 2014-12-31 KI1
ABAD 1234567 2004-12-31 KI1



I need my output file as

Code:
ABCD  2004-12-31
AGCD 2004-12-31
ASCD 2004-11-31
ABGD 2014-12-31
ABAD 2004-12-31.


Is it possible to get the desired output using sortcard?

Is it possible to check if spaces are in mid of field and if so to realign?


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

nareshdacha

New User


Joined: 12 Jan 2010
Posts: 66
Location: US

PostPosted: Fri Mar 11, 2011 4:53 pm    Post subject: Reply to: Remove spaces in mid of field and realign
Reply with quote

Hey Madan,
Try the below code...

Code:

//STEP010  EXEC  SORTD                         
//SORTIN   DD  *                               
ABCD 1234567 2004-12-31 KI1                     
AGCD 12 2004-12-31 KI1                         
ASCD 123 2004-11-31 KI1                         
ABGD 1 2014-12-31 KI1                           
ABAD 1234567 2004-12-31 KI1                     
//*                                             
//SORTOUT  DD  DSN=OUTPUT.DATASET,         
//             DISP=(NEW,CATLG,DELETE),                         
//             SPACE=(CYL,(5,5),RLSE),       
//             DCB=(LRECL=38,RECFM=FB)         
//*                                             
//SYSIN    DD  *                               
 SORT FIELDS=COPY                               
  INREC PARSE=(%00=(ENDBEFR=C' ',FIXLEN=5),     
               %01=(ENDBEFR=C' ',FIXLEN=8),     
               %02=(ENDBEFR=C' ',FIXLEN=11),   
          %03=(ENDBEFR=C' ',FIXLEN=3)),
       BUILD=(%00,%02)                     



Output:

ABCD 2004-12-31
AGCD 2004-12-31
ASCD 2004-11-31
ABGD 2014-12-31
ABAD 2004-12-31
Back to top
View user's profile Send private message
MadanVS

New User


Joined: 28 Dec 2010
Posts: 25
Location: Chennai

PostPosted: Fri Mar 11, 2011 5:25 pm    Post subject: Reply to: Remove spaces in mid of field and realign
Reply with quote

Will try Naresh..

Thanks.

Madhan
Back to top
View user's profile Send private message
MadanVS

New User


Joined: 28 Dec 2010
Posts: 25
Location: Chennai

PostPosted: Fri Mar 11, 2011 5:40 pm    Post subject:
Reply with quote

Hi Naresh

My input file is of VB. I am facing the following error:
Code:

SYNCSORT LICENSED FOR CPU SERIAL NUMBER 8BC96, MODEL 2817 706             
SYSIN :                                                                   
 OPTION COPY                                                             
 INREC PARSE=(%00=(ENDBEFR=C' ',FIXLEN=12),                               
              %01=(ENDBEFR=C' ',FIXLEN=03),                               
              %02=(ENDBEFR=C' ',FIXLEN=26),                               
              %03=(ENDBEFR=C' ',FIXLEN=26),                               
              %04=(ENDBEFR=C' ',FIXLEN=10),                               
              %05=(ENDBEFR=C' ',FIXLEN=26),                               
              %06=(ENDBEFR=C' ',FIXLEN=24)),                             
              BUILD=(%00,%05)                                             
WER276B  SYSDIAG= 4250806, 9222513, 9222513, 5326800                     
WER164B  6,896K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,       
WER164B     12K BYTES RESERVE REQUESTED, 1,004K BYTES USED               
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                           
WER108I  SORTIN   : RECFM=VB   ; LRECL=  8196; BLKSIZE= 27998             
WER235A  INREC    RDW NOT INCLUDED                                       
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                           
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: Fri Mar 11, 2011 5:52 pm    Post subject:
Reply with quote

Your product is SYNCSORT and NOT DFSORT

Topic moved to JCL forum for SYNCSORT questions.
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: Sat Mar 12, 2011 3:09 pm    Post subject:
Reply with quote

Why have posted the exact same requirement AGAIN in the DFSORT forum when it is obvious, and also stated, that your product is SYNCSORT.

There are many topics on converting VB to FB and FB to VB on the forum.

Why not try that little innovation called the SEARCH button at the top of any page.

This is a HELP forum and not a post it again until somebody else does my work for me forum.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Mar 13, 2011 1:07 am    Post subject:
Reply with quote

Hello,

What does the documentation tell you about the WER235A message?
Back to top
View user's profile Send private message
MadanVS

New User


Joined: 28 Dec 2010
Posts: 25
Location: Chennai

PostPosted: Mon Mar 14, 2011 10:48 am    Post subject:
Reply with quote

Thanks all ..

Got the solution:

Used this sort card
Code:

OPTION COPY                           
OUTFIL VTOF,                         
PARSE=(%00=(ENDBEFR=X'05',FIXLEN=12),
       %01=(ENDBEFR=X'05',FIXLEN=03),
       %02=(ENDBEFR=X'05',FIXLEN=26),
       %03=(ENDBEFR=X'05',FIXLEN=26),
       %04=(ENDBEFR=X'05',FIXLEN=10),
       %05=(ENDBEFR=X'05',FIXLEN=26),
       %06=(ENDBEFR=X'05',FIXLEN=24)),
BUILD=(%00,%05)                     
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 14, 2011 11:14 am    Post subject: Reply to: Syncsort - Remove spaces in mid of field and reali
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
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


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