View previous topic :: View next topic
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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: 8796 Location: Welsh Wales
|
|
|
|
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
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 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: 8796 Location: Welsh Wales
|
|
|
|
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: 8796 Location: Welsh Wales
|
|
|
|
/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
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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
Superior Member
Joined: 14 Mar 2007 Posts: 10886 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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Prasanya wrote: |
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. |
Unless you learn, and very quickly, that when you bother to post usefull information you may receive a usefull answer. |
|
Back to top |
|
|
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
My input file is a SAS log file from a production system. I need to validate the messages and errors in it using a job since i get 22 such files a day.
When i tried checking for the errors and messages using the positions that i found in the log file - they dint match. Thats why i thought it would be better to convert the log file to a FB file.
Please suggest if there is any appropriate way to validate the errors and messages present in the log file |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
please reread my previous post ! |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
the data is from DDNAME SASLOG and is a VB file with an LRECL of 137.
How is the dataset created ? ie. What does the JCL for //SASLOG DD look like ?
Gerry |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Prasanya wrote: |
When i tried checking for the errors and messages using the positions that i found in the log file - they dint match. Thats why i thought it would be better to convert the log file to a FB file. |
Why not just add one to 'the position' to allow for the 'I/O command code'? |
|
Back to top |
|
|
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
Hi William,
I had already tried that but that din't work.
Gerry:
I wasn't able to understand your question.
The SASLOG file is from a third party production system. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Prasanya wrote: |
I had already tried that but that din't work. |
Please explain "did not work"...... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
but that din't work. |
(*)
that' awful, we hope You can fix it soon.
do You realize that You did not post yet anything useful to get an answer..
please reply/post to the following...
1) input file layout and content
2) output file layout and content
3) description of the process
what is the relation of the input and output files in Your second post ? |
|
Back to top |
|
|
Prasanya
New User
Joined: 04 Jun 2007 Posts: 34 Location: Chennai
|
|
|
|
!) The input file is a SAS log file with length 255 and RECFM is FBA. I had already given some content from the input file. Its not a content from SYSprint or SYSout. Its a log file sent by a production system and hence looks similar to SYSPRINT.
2) Ouput is an Error file with RECFM as FB, containing only critical errors from the SAS log file
3) The process as mentioned earlier is to validate the errors and messages present in the SAS log file and send required notifications.
Eg: Input file
Code: |
NOTE: This session is executing on the z/OS V01R10M00 platform.
NOTE: Running on IBM Model 2097 Serial Number 014A32,
IBM Model 2097 Serial Number 014A32,
+ERROR: Teradata execute: Object 'AAAAAAAAAAAAAAAAAAA',
+ERROR: Teradata execute: Object 'BBBBBBBBBBBBBBBBBBB'
|
This error field is shown in position 2 but when i search for 'ERROR:' string from position 2 its not found.
So wen i tried writing the entire input log file to an output FB file these records were displayed as follows:
Code: |
¡NOTE: This session is executing on the z/OS kV01R10M00 platform.̯ÌÚ ©NOTE: Running on IBM Model 2097 Serial Number 014A32,ÌH tIBM Model 2097 Serial Number 014A32,}ERROR: Teradata execute: Object 'AAAAAAAAAAAAAAAAAAA' ,}ERROR: Teradata execute: Object 'BBBBBBBBBBBBBBBBBBB'
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
are You sure about the FB ??? looks more like a VB thing to me
ISPF edit/view/browse hides quite a few details! |
|
Back to top |
|
|
|