|
|
| Author |
Message |
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
Hi
I need to convert a FBA file to FB file. My FBA file is a log file. I have tried converting using synsort, IEBGENER and FILEAID but the target file is not having the same positions as in the input file.
Example, My input FBA file has the 3rd record from position 2 to 55 like,
NOTE: Running on IBM Model 2097 Serial Number 014A32,
But in my output file it is in the 2nd record itself from position 32 to 85 as
©NOTE: Running on IBM Model 2097 Serial Number 014A32
Please let me know how do i handle this without changing the positions except for the 1 byte for FBA |
|
| Back to top |
|
 |
References
|
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6469 Location: Brussels once more ...
|
|
|
|
| Unless you post the code and output from the batch job that you submit there is very little anyone can really do to help you. |
|
| Back to top |
|
 |
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
My conversion code using IEBGENER is
| Code: |
//STEP01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=AAAAA.MYWORKS.INPUT,DISP=SHR
//SYSUT2 DD DSN=AAAAA.MYWORKS.OUTPUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,5),RLSE),
// DCB=RECFM=FB
//SYSIN DD DUMMY
|
1st 4 records of input file
| Code: |
1 The SAS System 01:00 Tuesday, February 2, 2010
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
|
The Output file is
| Code: |
F a11 ýThe SAS System Æ01:00 Tuesday, February 2, 2010Ì`ÌÚ BNOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.Ì[ qNOTE: SAS (r) 9.1 (TS1M3)ÌU
|
|
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6469 Location: Brussels once more ...
|
|
|
|
| I think that using your SORT product would be easiest |
|
| Back to top |
|
 |
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
i got the same out put when i used the following job
| Code: |
//STEP02 EXEC PGM=SYNCSORT
//SORTIN DD DSN=AAAAA.MYWORKS.INPUT,DISP=SHR
//SORTOUT DD DSN=AAAAA.MYWORKS.OUTPUT,
// DISP=(NEW,CATLG,DELETE),RECFM=FB,SPACE=(CYL,(10,10),RLSE)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:2,254,1X)
/*
|
Please let me know if there is any other way to do this |
|
| Back to top |
|
 |
PeterHolland
Active Member
Joined: 27 Oct 2009 Posts: 530 Location: Netherlands, Amstelveen
|
|
|
|
Why would someone want to reformat SAS log output?
And if there is a SAS log, i guess SAS is installed.
So use SAS to get rid of the print control character. |
|
| Back to top |
|
 |
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
Can you please tell me how to do it with SAS?
I need to validate some data and thats why i need the positions. |
|
| Back to top |
|
 |
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
| Isn't there a way to do this using SORT? |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6469 Location: Brussels once more ...
|
|
|
|
| What are the file attributes for the input, and what do you want them to be for the output. |
|
| Back to top |
|
 |
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
File attributes for Input file:
Organization . . . : PS
Record format . . . : FBA
Record length . . . : 255
Block size . . . . : 27795
File attributes for Output file:
Organization . . . : PS
Record format . . . : FB
Record length . . . : 254
Block size . . . . : 25400 |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6469 Location: Brussels once more ...
|
|
|
|
/Good mood ON
I use DFSORT here, but for such a simple task as this I can not see that the control statements would vary very much, if at all, but if they do I'm sure that one of the SYNCSORT users / support will be better able to help you.
| Code: |
//SORTSTEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input dataset name,DISP=SHR
//SORTOUT DD DSN=Output dataset name,DISP=(,CATLG,DELETE),
// SPACE=( ),RECFM=FB,LRECL=255
//SYSIN DD *
OPTION COPY
OUTFIL OUTREC=(2,254,1X)
/* |
Although, I can't really see the difference between processing a FB file or an FBA file.
/Good mood OFF |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 13593 Location: 221 B Baker St
|
|
|
|
Hello,
I also wonder about the need to make an entire copy of the file when all of the needed data is in the original?
Is there some reason to not process the existing file? |
|
| Back to top |
|
 |
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
| While processing the existing file, am having mismatch in the positions that i give in my sort control cards.. Please help me with this. I need to check for the presence of certain data in the existing file. |
|
| Back to top |
|
 |
Arun Raj
Senior Member
Joined: 17 Oct 2006 Posts: 1564 Location: Chennai, India
|
|
|
|
| Quote: |
| I need to check for the presence of certain data in the existing file. |
AFAIK You can very well do this without converting it to FB. As suggested above process the existing FBA file. What do you mean by "mismatch" here? |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 5395 Location: italy
|
|
|
|
You have not explained yet what You want to achieve,
clarity when asking for help is a prerequisite for good answers...
You posted two files samples...
the first one is, looks like, a sysout/sysprint dataset
the second one even if contains the same info, is formatted in some SASish way
and does not look at all like a FBsomething dataset, more likely like a variable length one.
so, please explain again, in a better way what You want to do,
and no confusion in the file description please.
if You simply want to process the sysprint file, why post the misleading output file ??? |
|
| Back to top |
|
 |
|
|