Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JCL Utility in accordance to the copybook layout

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
meetsupriyo

New User


Joined: 19 May 2009
Posts: 11
Location: Hyderabad

PostPosted: Tue Dec 08, 2015 8:46 pm    Post subject: JCL Utility in accordance to the copybook layout
Reply with quote

Hi,

I have a requirement like below.
Input : Copybook Layout
Output : File with Sample Data in accordance to the copybook layout

Is it possible through any Utility or REXX program?

Thanks.[/b]
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1786
Location: NY,USA

PostPosted: Tue Dec 08, 2015 11:29 pm    Post subject:
Reply with quote

Do you mind to tell us why do you need this at first place?
How many such copybooks do you have? If fewer then write a COBOL program and pass the copybook name though JCL parm and create files so in short each para in that program corresponds to unique copybook layout.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1868
Location: UK

PostPosted: Wed Dec 09, 2015 6:27 am    Post subject:
Reply with quote

If this is a one-off task and for very few copybook then it would be quicker to construct the records by hand. Otherwise I think you are going to have to do one program per copybook although a Rexx solution could read the copybook and create data for each field as it is read in - but do not come running here when you have to create packed decimal data as there are routines out there on the web - possibly in the rexx forum of this forum.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Thu Dec 10, 2015 4:53 pm    Post subject:
Reply with quote

  • If you don't have it, download the Smart DFSORT Tricks pdf file (worth even if you have SYNCSORT).
  • Use all the information in chapter "Create DFSORT Symbols from COBOL Copybook" to map your copybook.
    You may want to make some adaptations (no need for group fields or different output format, for example).
  • Write a COBOL program. Input will be the "symbols" file instead of the COBOL copybook.
    As you will have the offset, the length and the format, it should be quite easy to build a "record" containing valid data.
  • By valid I mean in the correct format. In the example in the pdf file, you have a date and a time fields.
    You'll have to detect this (by checking the field name?) and generate logically valid data.
    Same goes for other fields (will you need a sequence number or a random number? How to generate a name and so on).
Good Luck.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts HLIST Utility In Batch Virendra Shambharkar TSO/ISPF 4 Fri Apr 07, 2017 3:38 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us