View previous topic :: View next topic
|
Author |
Message |
MadanVS
New User
Joined: 28 Dec 2010 Posts: 25 Location: Chennai
|
|
|
|
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 |
|
|
nareshdacha
New User
Joined: 12 Jan 2010 Posts: 66 Location: US
|
|
|
|
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 |
|
|
MadanVS
New User
Joined: 28 Dec 2010 Posts: 25 Location: Chennai
|
|
|
|
Will try Naresh..
Thanks.
Madhan |
|
Back to top |
|
|
MadanVS
New User
Joined: 28 Dec 2010 Posts: 25 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Your product is SYNCSORT and NOT DFSORT
Topic moved to JCL forum for SYNCSORT questions. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What does the documentation tell you about the WER235A message? |
|
Back to top |
|
|
MadanVS
New User
Joined: 28 Dec 2010 Posts: 25 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
|
|