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
 

 

Create output file from control card

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Sureznicky

New User


Joined: 29 Apr 2014
Posts: 2
Location: India

PostPosted: Thu Mar 12, 2015 3:14 pm    Post subject: Create output file from control card
Reply with quote

Hi,

I have a requirement in which i have to read a control card and create output file based on the range(highlighted in yellow) present in control card.

Code:
Control card--012345001 029820000 9
                    100018369 102347359 9



output file should be like below:
Code:
SORT FIELDS=(6,6,BI,A,632,8,BI,A,20,17,BI,A,37,7,BI,D)
OUTFIL FILES=01,                                       
    INCLUDE=(0005,001,CH,EQ,C'0',       
             OR,                                       
             0005,001,CH,EQ,C'9',             
             OR,                                       
              (0100,008,BI,GE,0012345001,
               AND,                                   
               0100,008,BI,LE,0029820000),
             OR,                         
              (0100,008,BI,GE,0100018369,
              AND,                       
              0100,008,BI,LE,0102347359))

Based on control card range 100,8 position in o/p file has to written. remaining are all should be built as it is.


Please guide me to create this using sort/eazytrieve.

Code'd
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Mar 12, 2015 3:24 pm    Post subject: Reply to: Create output file from control card
Reply with quote

the yellow color makes the post unreadable icon_evil.gif
Back to top
View user's profile Send private message
Sureznicky

New User


Joined: 29 Apr 2014
Posts: 2
Location: India

PostPosted: Thu Mar 12, 2015 3:36 pm    Post subject: Reply to: Create output file from control card
Reply with quote

Sorry for making it unreadable.


I have a requirement in which i have to read a control card and create output file based on the range present in control card.

Code:
Control card--012345001 029820000 9
                    100018369 102347359 9



output file should be like below:
Code:
SORT FIELDS=(6,6,BI,A,632,8,BI,A,20,17,BI,A,37,7,BI,D)
OUTFIL FILES=01,
INCLUDE=(0005,001,CH,EQ,C'0',
OR,
0005,001,CH,EQ,C'9',
OR,
(0100,008,BI,GE,0012345001,
AND,
0100,008,BI,LE,0029820000),
OR,
(0100,008,BI,GE,0100018369,
AND,
0100,008,BI,LE,0102347359))


Based on control card range 100,8 position in o/p file has to written. remaining are all should be built as it is.


Please guide me to create this using sort/eazytrieve.

Code'd
Back to top
View user's profile Send private message
Devil_13

New User


Joined: 17 Mar 2015
Posts: 2
Location: India

PostPosted: Wed Mar 18, 2015 10:29 pm    Post subject:
Reply with quote

Hi Suresh
I think you can do it using a combination of OUTFIL HEADER1,,HEADER3 and TRAILER1.

you can refer to this sample code:
Code:

SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,REMOVECC,NODETAIL,
SECTIONS=(1,8
HEADER3=(C'(0100,008,BI,GE,',1,8,,C',',/,
                 C'AND',',/,
                 C'0100,008,BI,LE,',9,8,,C'),',/,
                 C'OR,')),
HEADER1=(C'SORT FIELDS=(6,6,BI,A,632,8,BI,,A,,20,17,,BI,,A,
                 C'37,7,BI,D)',/,
                 C'OUTFIL FILES=01,',/,
                 C'INCLUDE=(005,001,CH,EQ,C''',C'0',C''',',/,
                 C'OR,'),
TRAILER1=(C'005,001,,CH,EQ,C''',C'9',''')')


I have assumed the key length in control card to be 8.

Thanks
Devil13
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Mar 18, 2015 11:03 pm    Post subject: Reply to: Create output file from control card
Reply with quote

Devil_13,

Why would there be a key?
Back to top
View user's profile Send private message
Devil_13

New User


Joined: 17 Mar 2015
Posts: 2
Location: India

PostPosted: Thu Mar 19, 2015 1:59 am    Post subject: Reply to: Create output file from control card
Reply with quote

Hi Bill,
I meant the content of the control card:
Code:

012345001 029820000 9
100018369 102347359 9


Since these will be part of the include condition i mentioned them as keys. probably a range of account numbers or any unique identifiers i guess icon_smile.gif

Thanks
Devil13
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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