Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Conversion from FBA to FB
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
Prasanya

New User


Joined: 04 Jun 2007
Posts: 34
Location: Chennai

PostPosted: Mon Feb 08, 2010 4:36 pm    Post subject: Conversion from FBA to FB
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
References
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 6469
Location: Brussels once more ...

PostPosted: Mon Feb 08, 2010 4:40 pm    Post subject:
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    Post subject:
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: 6469
Location: Brussels once more ...

PostPosted: Mon Feb 08, 2010 5:04 pm    Post subject:
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    Post subject:
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

Active Member


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

PostPosted: Mon Feb 08, 2010 5:33 pm    Post subject:
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    Post subject:
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    Post subject:
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: 6469
Location: Brussels once more ...

PostPosted: Mon Feb 08, 2010 5:45 pm    Post subject:
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    Post subject:
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: 6469
Location: Brussels once more ...

PostPosted: Mon Feb 08, 2010 6:39 pm    Post subject:
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

Global Moderator


Joined: 23 Nov 2006
Posts: 13593
Location: 221 B Baker St

PostPosted: Mon Feb 08, 2010 8:42 pm    Post subject:
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    Post subject:
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

Senior Member


Joined: 17 Oct 2006
Posts: 1564
Location: Chennai, India

PostPosted: Tue Feb 09, 2010 12:10 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 5395
Location: italy

PostPosted: Tue Feb 09, 2010 12:17 pm    Post subject: Reply to: Conversion from FBA to FB
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 HoursGoto page 1, 2, 3, 4  Next
Page 1 of 4