Converting file of RECFM=U to RECFM=FB

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
biswaranjan
Member
Posts: 20
Joined: Thu Aug 28, 2008 10:41 am

Converting file of RECFM=U to RECFM=FB

Post by biswaranjan » Mon Feb 09, 2009 2:45 pm

Hi,

Could anyone help me in acheiving this.

I want to copy a file of RECFM=U to RECFM=FB.

I/P file:

Organization . . . :,PS
Record format . . . :,U
Record length . . . :,0
Block size . . . . :,4096

O/P file :
Organization . . . :,PS ,
Record format . . . :,FB ,
Record length . . . :,4096 ,
Block size . . . . :,4096 ,

Thanks,
Biswa.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Feb 16, 2009 11:02 am

Hi,

Did you try using IEBGENER?
Regards,
Anuj

biswaranjan
Member
Posts: 20
Joined: Thu Aug 28, 2008 10:41 am

Post by biswaranjan » Tue May 12, 2009 10:31 am

Hi Anju,

Thanks a lot for your information.

I used IDCAMS with REPRO command and I'm able to copy the Unformated file to FB.

Thanks,
Biswa.
Last edited by biswaranjan on Wed Jan 06, 2010 10:27 am, edited 1 time in total.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue May 12, 2009 10:46 am

Glad to hear you could make it work . . . :)

If you share your solution here, that will help some one later . . . :)


PS. My name is Anuj and not Anju.
Regards,
Anuj

biswaranjan
Member
Posts: 20
Joined: Thu Aug 28, 2008 10:41 am

Post by biswaranjan » Tue Dec 29, 2009 6:59 pm

//STEPA EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//OLD DD DSN=I/P file,DISP=SHR
//NEW DD DSN=O/P file,
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=0,RECFM=FB,BLKSIZE=4096), <-- Same as I/P file DCB
except RECFM
// SPACE=(CYL,(280,100),RLSE)
//SYSIN DD *
REPRO -
INFILE(OLD) -
OUTFILE(NEW) -
SKIP(100) -
COUNT(100)
/*

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Dec 29, 2009 8:25 pm

Thanks for keeping us posted with the solution you used. I did not try IDCAMS for this purpose lately, and feeling lazy to get connected to mainframes to test it as 'am not keeping well today. However, copying RECFM=U files works quite well in IEBGENER, for output files of U or V format.You can use below JCL as an example:

Code: Select all

//STEP001    EXEC PGM=IEBGENER,REGION=6M 
//SYSIN    DD   DUMMY 
//SYSPRINT DD   SYSOUT=* 
//SYSUT1   DD   DISP=SHR,DSN=XXXXX.COMPILES.LOADLIB&#40;MEMBER&#41; 
//SYSUT2   DD   DISP=&#40;,CATLG&#41;,DSN=XXXXX.MEMBER.LOADLIB, 
//         DCB=&#40;DSORG=PS,RECFM=V,BLKSIZE=27998&#41;, 
//         UNIT=SYSDA, 
//         SPACE=&#40;CYL,&#40;1,1&#41;&#41;
Bur I'd like to ask - Why would you want to copy an undefined file to fixed length? That'll waste a lot of space since your fixed record size will have to be equal to the largest possible undefined record size. :neutral:
Regards,
Anuj

biswaranjan
Member
Posts: 20
Joined: Thu Aug 28, 2008 10:41 am

Post by biswaranjan » Wed Dec 30, 2009 12:48 pm

The aim was to edit the Unformated I/P file as it can't be edited directly.
The approch was to put it in FB format, edit it and put it back to the initial format.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Dec 30, 2009 3:18 pm

Good Lcuk... :?
Last edited by Anuj Dhawan on Thu Dec 31, 2009 2:16 pm, edited 1 time in total.
Regards,
Anuj

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Dec 30, 2009 11:00 pm

and put it back to the initial format.
most of the time Format=U files are load modules. If you are trying to modify a load module, suggest you research ZAP.

as far as 'putting it back', how are you going to accomplish that?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others