I need to access a table field (empno) that occurs 10 times in my input data file using a JCL to be written onto a new file with each entry of the table as a record.
Is it possible to do the above without writing a COBOL program?
Could anyone Please help on the above case.
Sample of my Input format is as below,
empname PIC x(10).
entries PIC 9(1).
empno PIC 9(3) occurs 10 times.
If the entries field equals to 3 then empno field would be like below,
empno(1)=101 empno(2)=102 empno(3)=103.
my output should look as below. each emp no should be displayed as a separate record.
Alex 2 101
Alex 2 102
Alex 2 103
John 1 200
Mary 3 301
Mary 3 302
Mary 3 303
hi,
can we use the same concept by givin the input in a DSN(i mean to say instead of an instream data),then in tat case, wat do we need to change in OUTFIL?
Also can we use SORT in the EXEC statement instead of SYNCTOOL?
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
can we use the same concept by givin the input in a DSN(i mean to say instead of an instream data),then in tat case, wat do we need to change in OUTFIL?
Yes. you can. You dont need to change anything if your input layout matches with the data given above.
Quote:
Also can we use SORT in the EXEC statement instead of SYNCTOOL?
No. SORT and SYNCTOOL are not the same. Each of them has its own control statements.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Vidya Bhama wrote:
For eg I have the below input
Alex 2 101englishdept boston 102
the desired output is
Alex 2 englishdept 101 boston
Alex 2 englishdept 102 boston
The sample data provided does n't seem to clarify what you exactly want to achieve. Do you have any other fields in the ws-table other than "empno"?
Are "englishdept" and "boston" ws-table field values? Can you post here the input/output cobol layout
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Syncsort's SYNCTOOL is equivalent to DFSORT's ICETOOL.
No, it isn't. DFSORT's ICETOOL is fully documented. Syncsort's SYNCTOOL is not documented.
DFSORT's ICETOOL has functions that Syncsort's SYNCTOOL does not have such as the DATASORT and SUBSET operators, and many operands such as FIRST(n) and FIRSTDUP(n) for the SELECT operator, WITHANY for the SPLICE operator, ADD, SUB, WRITE, TEXT, DIGITS, EDCOUNT and WIDTH for the COUNT operator, COUNT, EDCOUNT, BCOUNT, EDBCOUNT for the DISPLAY operator, NOCC, multiple TITLE operands, TLEFT, TFIRST for the DISPLAY and OCCUR operators, etc.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Frank,
By equivalent I meant "to be similar" and not exactly the same. I am aware that you've added a lot more functions in DFSORT.
I m sorry If I confused anybody by qouting that.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Equivalent does not mean "similar". It means "equal". You might want to be more careful with your terminology so as not to imply what you don't mean to imply.
I meant to say that my emp_no is the only table field in the Input file and also the values for the field does not come in a continous order in the file. Say for example the empno(1) comes in col 6-8 ,empno(2) comes in col
29-31.
eg: emp_no PIC 9(3) occurs 10 times.
Inut file looks as below (highlighted in bold are the empno values found in the file positions 6-8 and 29-31)
input: Alex2101englishdeptboston102
output: Alex 2 englishdept 101 boston
Alex 2 englishdept 102 boston
and my output should look as stated before with fillers in between each field and the emp number taken up in each line.Can this be done in Outfil itself or Outrec combined with Outfil?
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
eg: emp_no PIC 9(3) occurs 10 times.
Inut file looks as below (highlighted in bold are the empno values found in the file positions 6-8 and 29-31)
input: Alex2101englishdeptboston102
output:
Alex 2 englishdept 101 boston
Alex 2 englishdept 102 boston
Your "code" an your data do not match. Where is the 3rd "occurs" value? How should the code know to put the 101 or 102 in the middle of the text? Why is the "2" separated from "Alex" in the output.
For someone to help, you need to actually post the proper definition.
No one should try to suggest anything until you completely define the rules.
Syncsort's SYNCTOOL is equivalent to DFSORT's ICETOOL.
No, it isn't. DFSORT's ICETOOL is fully documented. Syncsort's SYNCTOOL is not documented.
DFSORT's ICETOOL has functions that Syncsort's SYNCTOOL does not have such as the DATASORT and SUBSET operators, and many operands such as FIRST(n) and FIRSTDUP(n) for the SELECT operator, WITHANY for the SPLICE operator, ADD, SUB, WRITE, TEXT, DIGITS, EDCOUNT and WIDTH for the COUNT operator, COUNT, EDCOUNT, BCOUNT, EDBCOUNT for the DISPLAY operator, NOCC, multiple TITLE operands, TLEFT, TFIRST for the DISPLAY and OCCUR operators, etc.
I really want to believe that Alissa (wich btw is the JCL moderator) takes note of these posts in order to improve SYNCTOOL.
I cannot remember but I THINK she told me once they were working on SyncTool Documentation.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I really want to believe that Alissa (wich btw is the JCL moderator) takes note of these posts in order to improve SYNCTOOL.
I cannot remember but I THINK she told me once they were working on SyncTool Documentation.
I distinctly remember that she originally posted that they were, but then later posted that they weren't. I wish I had kept track of the specific URLs with those posts, but I didn't. It may have actually been on another help board.