Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Want it to be copied to file B with 10 LRECL in each line

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
arunswap

New User


Joined: 23 Mar 2006
Posts: 13

PostPosted: Mon Apr 17, 2006 10:28 am    Post subject: Want it to be copied to file B with 10 LRECL in each line
Reply with quote

I have a file A with LRECL 100.
I want it to be copied to file B with 10 LRECL in each line.
How do u do it in COBOL?
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Mon Apr 17, 2006 11:46 am    Post subject: Re: Want it to be copied to file B with 10 LRECL in each lin
Reply with quote

Code:
01 WS-IN-REC.
   05 WS-IN-1   PIC X(10).
   05 WS-IN-2   PIC X(10).
   05 WS-IN-3   PIC X(10).
   05 WS-IN-4   PIC X(10).
   05 WS-IN-5   PIC X(10).
   05 WS-IN-6   PIC X(10).
   05 WS-IN-7   PIC X(10).
   05 WS-IN-8   PIC X(10).
   05 WS-IN-9   PIC X(10).
   05 WS-IN-10   PIC X(10).

PERFORM PROCESS-PARA UNTIL END-OF-INFILE.

PROCESS-PARA
READ INPUT-FILE INTO WS-IN-REC.
WRITE OUT-REC FROM WS-IN-1.
WRITE OUT-REC FROM WS-IN-2.
WRITE OUT-REC FROM WS-IN-3.
WRITE OUT-REC FROM WS-IN-4.
WRITE OUT-REC FROM WS-IN-5.
WRITE OUT-REC FROM WS-IN-6.
WRITE OUT-REC FROM WS-IN-7.
WRITE OUT-REC FROM WS-IN-8.
WRITE OUT-REC FROM WS-IN-9.
WRITE OUT-REC FROM WS-IN-10.


Regards,
Priyesh.
Back to top
View user's profile Send private message
prakash271082

New User


Joined: 09 Sep 2005
Posts: 53

PostPosted: Mon Apr 17, 2006 11:53 am    Post subject:
Reply with quote

Hi,

These are all the basic things that everyone should be knowing. Please look in to any of the postings before hand else look in to manual before posting your queries henceforth.
Back to top
View user's profile Send private message
gyana

New User


Joined: 09 Feb 2006
Posts: 4

PostPosted: Mon Apr 17, 2006 12:07 pm    Post subject: taking backup of database.
Reply with quote

Hello friends,
I want to take backup of an area (IDMS database). I can do so by writing a program wherein i'll sweep the whole area and write it to a file and later upload the databse from the file. My questiuon is "Is there any utility thru which i can take the backup and upload the data of a particular area of a databse?"

Regards,
Gyana
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us