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
 

 

SYNCSORT- extracting the info from the copy book?

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

New User


Joined: 04 Jun 2008
Posts: 36
Location: Chennai

PostPosted: Fri Oct 31, 2008 1:18 pm    Post subject: SYNCSORT- extracting the info from the copy book?
Reply with quote

Hi All,

I have a requirement, in which i have to extract all the details from the copybook i.e Variable name, length of the variable, If , and write to other file as below:

Output:
Code:
 
Field name                       Field Length   
AGENT_NAME                        X(25)         
AGENT_PHONE                       X(10)   


My input file is of type FB, length =80. Position of PIC clause starts at 55 position and my copy books has 05 and 10, 88 level variables.

Is that possible to extract all the copybooks info in the PDS? Help me out in this case.

Thanks,
Guru.
Back to top
View user's profile Send private message

sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Fri Oct 31, 2008 11:58 pm    Post subject: Reply to: SYNCSORT- extracting the info from the copy book?
Reply with quote

Guru Prasath,
Do you have fixed positions for the level,start position of variable as well ?

If they are fixed,then it is easy to extract them.

Thanks
Krishy
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sat Nov 01, 2008 12:44 am    Post subject:
Reply with quote

Hi,

It should be doable with a litlle paly around the SORT key words but you need to show a better exapmle of input & corresponding output.

By the way, I was never in a need for such an information however if you have FileAid available at your site you can do it very easily. Output would look like:
Code:
File-AID ---------------------- VIEW LAYOUT ---------------------- Row 1 of 13
COMMAND ===> _______________________________________________  SCROLL ===> CSR
Layout: XXXXXX.XXX1.COPYLIB(TSERPRDC)                                         
                                                 FIELD                       
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START     END  LENGTH
ESP-RESP-CORR-DEPT-TBL                                      1     550     550
3 ESP-RESP-CORR-DEPT-TBL              GROUP          1      1     550     550
  5 TSERPRD-ARGUMENT-DATA             GROUP          2      1      50      50
    10 SE-PAY-CTR-CD                  XX             3      1       2       2
    10 SE-CPTR-CTR-CD                 XX             4      3       4       2
    10 SE-FINAN-ITEM-CD               X              5      5       5       1
    10 SE-LOAD-NO                     XXX            6      6       8       3
    10 SE-PAY-DCLN-RSN-CD             XX             7      9      10       2
    10 FILLER                         X(40)          8     11      50      40
  5 TSERPRD-RESULT-DATA               GROUP          9     51     550     500
    10 SE-PAY-DCLN-RESP-DEPT-CD                                               
                                      XX            10     51      52       2
    10 FILLER                         X(498)        11     53     550     498
******************************* Bottom of data *******************************

when the input is:
Code:
 03  ESP-RESP-CORR-DEPT-TBL.                                   
*TSERPRD                                                       
     05 TSERPRD-ARGUMENT-DATA.                                 
*                                                   DATAREJA   
      10 SE-PAY-CTR-CD        PIC X(02).                       
*                                                   CDPYCE     
      10 SE-CPTR-CTR-CD       PIC X(02).                       
*                                                   CDSECPTR   
      10 SE-FINAN-ITEM-CD     PIC X(01).                       
*                                                   CDFXZE     
      10 SE-LOAD-NO           PIC X(03).                       
*                                                   NOSLDE     
      10 SE-PAY-DCLN-RSN-CD   PIC X(02).                       
*                                                   DATAREJR   
      10 FILLER               PIC X(40).                       
     05 TSERPRD-RESULT-DATA.                                   
*                                                   CDPAYDCL   
      10 SE-PAY-DCLN-RESP-DEPT-CD                             
                              PIC X(02).                       
*                                                   CDESPDPT 
      10 FILLER               PIC X(498).                     
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 copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Need info with DBRC recovery ashek15 IMS DB/DC 0 Mon Jan 23, 2017 6:43 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm


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