IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Conversion from FBA to FB


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Mon Feb 08, 2010 4:36 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 08, 2010 4:40 pm
Reply with quote

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
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Mon Feb 08, 2010 4:53 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 08, 2010 5:04 pm
Reply with quote

I think that using your SORT product would be easiest
Back to top
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Mon Feb 08, 2010 5:32 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Feb 08, 2010 5:33 pm
Reply with quote

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
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Mon Feb 08, 2010 5:38 pm
Reply with quote

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
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Mon Feb 08, 2010 5:44 pm
Reply with quote

Isn't there a way to do this using SORT?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 08, 2010 5:45 pm
Reply with quote

What are the file attributes for the input, and what do you want them to be for the output.
Back to top
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Mon Feb 08, 2010 5:47 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 08, 2010 6:39 pm
Reply with quote

/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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Feb 08, 2010 8:42 pm
Reply with quote

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
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Tue Feb 09, 2010 11:48 am
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Feb 09, 2010 12:10 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Feb 09, 2010 12:17 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Feb 09, 2010 12:23 pm
Reply with quote

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
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Tue Feb 09, 2010 1:28 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Feb 09, 2010 1:46 pm
Reply with quote

please reread my previous post !
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Feb 09, 2010 1:52 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Feb 09, 2010 2:03 pm
Reply with quote

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
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Tue Feb 09, 2010 2:12 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Feb 09, 2010 2:14 pm
Reply with quote

Prasanya wrote:
I had already tried that but that din't work.
Please explain "did not work"......
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Feb 09, 2010 2:16 pm
Reply with quote

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
View user's profile Send private message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Tue Feb 09, 2010 2:37 pm
Reply with quote

!) 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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Feb 09, 2010 2:41 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2, 3  Next

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts SMF Record Date conversion failing CLIST & REXX 1
No new posts Assembler class assignment: stuck on ... PL/I & Assembler 12
Search our Forums:

Back to Top