Hexadecimal Dump Sequential File, 80-byte Records |
The SimoTime Home Page |
This suite of programs performs Sequential File I/O and HEX-Dump formatting (or hexadecimal display) of a Sequential File containing 80-Byte, fixed-length records using Micro Focus COBOL. The COBOL programs read the sequential file and dump the input records to an output file in Hexadecimal format. This suite of programs will run on a Mainframe System with ZOS or a Linux, UNIX or Windows System with Micro Focus Enterprise Developer/Server.
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
This example illustrates the following functions.
| ||||||||
Objectives and Functions of the Hexadecimal Dump Programs |
The following is a flowchart of the job for executing the HEX-Dump programs.
The main program (HX80DUMP) will read a Sequential file (TEXT0512) and produce a 128-byte, fixed record length Sequential file (SYSHEXT1). The contents of this file will be the HEX-Dump information for the first 128 byte of each record in the TEXT0512 input file. The source code for the CMD file, the JCL member and the COBOL programs is provided and may be modified to fit your environment. Color Associations: The Programming RequirementsThis suite of samples programs will run on the following platforms.
Data Input and OutputThe following sections describe the data flow and format. Data InputThe input is in stream data from the JCL Member or Command File. The following 27 records will be added to the file. 000100 Anderson Adrian 111 Peachtree Plaza Atlanta GA 26101 000200 Brown Billie 222 Baker Boulevard Baltimore MD 35702 000300 Carson Cameron 333 Crenshaw Blvd. Cupertino CA 96154 000400 Davidson Dion 444 Main Street Wilmington DE 27323 000500 Everest Evan 555 5TH Avenue New York NY 10341 000600 Franklin Francis 666 66TH Avenue Bedrock NY 11903 000700 Garfunkel Gwen 777 77TH Street New York NY 16539 000800 Harrison Hilary 888 88TH Street Pocatello ID 79684 000900 Isley Isabel 999 99TH Avenue Indianapolis IN 38762 001000 Johnson Jamie 1010 Paradise Drive Larkspur CA 90504 001100 Kemper Kelly 1111 Oak Circle Kansas City KS 55651 001200 Lemond Lesley 1212 Lockwood Road Mohave Desert AZ 80303 001300 Mitchell Marlow 1313 Miller Creek Road Anywhere TX 77123 001400 Newman Noel 1414 Park Avenue Santa Monica CA 90210 001500 Osborn Owen 1515 Center Stage Rolling Rock PA 36613 001600 Powell Pierce PO Box 1616 Ventura CA 97712 001700 Quigley Quincy 1717 Farm Hill Road Oshkosh WI 43389 001800 Ripley Ray 1818 Alien Lane Wayout KS 55405 001900 Smith Sammy 1919 Carnoustie Drive Novato CA 94919 002000 Tucker Taylor 2020 Sanger Lane St. Paul MN 43998 002100 Underwood Ulysses 2121 Wall Street New York NY 17623 002200 Van Etten Valerie 2222 Vine Street Hollywood CA 98775 002300 Wilson Wiley 2323 Main Street Boston MA 01472 002400 Xray Xavier 2424 24TH Street Nashville TN 44190 002500 Young Yanni 2525 Yonge Street Toronto ON 6B74A6 002600 Zenith Zebulon 2626 26TH Street Dallas TX 71922 123456 Doe John 123 Main Street Anywhere OR 88156 Data Output from EBCDIC-encoded FileThe following is an example of the HEX-Dump information for an EBCDIC-encoded file. ......@........@@@@@@@......@@@@...@.........@.....@@@@@.......@@@@@@@@..@.....@ FFFFFF4C9889A994444444C898894444FFF4D8888A9884D98A844444CA989A844444444CC4FFFFF4 00010001545926500000001499150000111075138395507319100000133153100000000710261010 000100 Anderson Adrian 111 Peachtree Plaza Atlanta GA 26101 * ......@.....@@@@@@@@@@......@@@@...@.....@.........@@@@@.........@@@@@@..@.....@ FFFFFF4C99A94444444444C899884444FFF4C89894C9A98A89844444C89A89998444444DC4FFFFF4 00020002966500000000002933950000222021259026435519400000213394695000000440357020 000200 Brown Billie 222 Baker Boulevard Baltimore MD 35702 * ......@......@@@@@@@@@.......@@@...@........@....K@@@@@@.........@@@@@@..@.....@ FFFFFF4C89A99444444444C898999444FFF4C989A88A4C9A84444444CA989A899444444CC4FFFFF4 0003000319265000000000314596500033303955281602354B000000347593956000000310961540 000300 Carson Cameron 333 Crenshaw Blvd. Cupertino CA 96154 * ......@........@@@@@@@....@@@@@@...@....@......@@@@@@@@@..........@@@@@..@.....@ FFFFFF4C8A88A994444444C899444444FFF4D8894EA988A444444444E899898A9944444CC4FFFFF4 00040004159426500000004965000000444041950239553000000000693495736500000450273230 000400 Davidson Dion 444 Main Street Wilmington DE 27323 * ......@.......@@@@@@@@....@@@@@@...@...@......@@@@@@@@@@...@....@@@@@@@..@.....@ FFFFFF4CA898AA44444444CA89444444FFF4FEC4CA89A84444444444D8A4E9994444444DE4FFFFF4 00050005559523000000005515000000555053801555450000000000556086920000000580103410 000500 Everest Evan 555 5TH Avenue New York NY 10341 * ......@........@@@@@@@.......@@@...@....@......@@@@@@@@@.......@@@@@@@@..@.....@ FFFFFF4C98999894444444C98988A444FFF4FFEC4CA89A8444444444C88998944444444DE4FFFFF4 00060006915239500000006915392000666066380155545000000000254963200000000580119030 000600 Franklin Francis 666 66TH Avenue Bedrock NY 11903 * ......@.........@@@@@@....@@@@@@...@....@......@@@@@@@@@...@....@@@@@@@..@.....@ FFFFFF4C898A9989444444CA89444444FFF4FFEC4EA988A444444444D8A4E9994444444DE4FFFFF4 00070007196452530000007655000000777077380239553000000000556086920000000580165390 000700 Garfunkel Gwen 777 77TH Street New York NY 16539 * ......@........@@@@@@@......@@@@...@....@......@@@@@@@@@.........@@@@@@..@.....@ FFFFFF4C8998A994444444C8989A4444FFF4FFEC4EA988A444444444D988A8999444444CC4FFFFF4 00080008199926500000008931980000888088380239553000000000763135336000000940796840 000800 Harrison Hilary 888 88TH Street Pocatello ID 79684 * ......@.....@@@@@@@@@@......@@@@...@....@......@@@@@@@@@............@@@..@.....@ FFFFFF4CA98A4444444444CA88894444FFF4FFEC4CA89A8444444444C9888989998A444CD4FFFFF4 00090009235800000000009212530000999099380155545000000000954915176392000950387620 000900 Isley Isabel 999 99TH Avenue Indianapolis IN 38762 * ......@.......@@@@@@@@.....@@@@@....@........@.....@@@@@........@@@@@@@..@.....@ FFFFFF4D989A9944444444D898844444FFFF4D89888A84C98A844444D899A9A94444444CC4FFFFF4 00100001685265000000001149500000101007191492504995500000319227490000000310905040 001000 Johnson Jamie 1010 Paradise Drive Larkspur CA 90504 * ......@......@@@@@@@@@.....@@@@@....@...@......@@@@@@@@@......@....@@@@..@.....@ FFFFFF4D89989444444444D899A44444FFFF4D894C89898444444444D89A8A4C8AA4444DE4FFFFF4 00110002547590000000002533800000111106120399335000000000215212039380000220556510 001100 Kemper Kelly 1111 Oak Circle Kansas City KS 55651 * ......@......@@@@@@@@@......@@@@....@........@....@@@@@@......@......@@..@.....@ FFFFFF4D89998444444444D8A98A4444FFFF4D989A9984D988444444D988A84C8A89A44CE4FFFFF4 00120003546540000000003523580000121203632666409614000000468155045259300190803030 001200 Lemond Lesley 1212 Lockwood Road Mohave Desert AZ 80303 * ......@........@@@@@@@......@@@@....@......@.....@....@@........@@@@@@@..@.....@ FFFFFF4D8A888994444444D8999A4444FFFF4D899894C98894D98844C9AA88984444444EE4FFFFF4 00130004933853300000004193660000131304933590395520961400158685950000000370771230 001300 Mitchell Marlow 1313 Miller Creek Road Anywhere TX 77123 * ......@......@@@@@@@@@....@@@@@@....@....@......@@@@@@@@.....@......@@@..@.....@ FFFFFF4D8A989444444444D989444444FFFF4D8994CA89A844444444E89A84D99888444CC4FFFFF4 00140005564150000000005653000000141407192015554500000000215310465931000310902100 001400 Newman Noel 1414 Park Avenue Santa Monica CA 90210 * ......@......@@@@@@@@@....@@@@@@....@......@.....@@@@@@@.......@....@@@..@.....@ FFFFFF4DA8999444444444DA89444444FFFF4C89A894EA8884444444D9998984D989444DC4FFFFF4 00150006226950000000006655000000151503553590231750000000963395709632000710366130 001500 Osborn Owen 1515 Center Stage Rolling Rock PA 36613 * ......@......@@@@@@@@@......@@@@..@...@....@@@@@@@@@@@@@.......@@@@@@@@..@.....@ FFFFFF4D9A899444444444D889884444DD4C9A4FFFF4444444444444E89AA9844444444CC4FFFFF4 00160007665330000000007959350000760267016160000000000000555349100000000310977120 001600 Powell Pierce PO Box 1616 Ventura CA 97712 * ......@.......@@@@@@@@......@@@@....@....@....@....@@@@@.......@@@@@@@@..@.....@ FFFFFF4DA8898A44444444DA898A4444FFFF4C8994C8994D98844444DA899A844444444EC4FFFFF4 00170008497358000000008495380000171706194089330961400000628262800000000690433890 001700 Quigley Quincy 1717 Farm Hill Road Oshkosh WI 43389 * ......@......@@@@@@@@@...@@@@@@@....@.....@....@@@@@@@@@......@@@@@@@@@..@.....@ FFFFFF4D8998A444444444D8A4444444FFFF4C98894D898444444444E8A9AA444444444DE4FFFFF4 00180009973580000000009180000000181801395503155000000000618643000000000220554050 001800 Ripley Ray 1818 Alien Lane Wayout KS 55405 * ......@.....@@@@@@@@@@.....@@@@@....@..........@.....@@@......@@@@@@@@@..@.....@ FFFFFF4E98A84444444444E899A44444FFFF4C8999AAA884C98A8444D9A8A9444444444CC4FFFFF4 00190002493800000000002144800000191903195642395049955000565136000000000310949190 001900 Smith Sammy 1919 Carnoustie Drive Novato CA 94919 * ......@......@@@@@@@@@......@@@@....@......@....@@@@@@@@..K@....@@@@@@@..@.....@ FFFFFF4EA8989444444444E8A9994444FFFF4E898894D89844444444EA44D8A94444444DD4FFFFF4 0020000343259000000000318369000020200215759031550000000023B071430000000450439980 002000 Tucker Taylor 2020 Sanger Lane St. Paul MN 43998 * ......@.........@@@@@@.......@@@....@....@......@@@@@@@@...@....@@@@@@@..@.....@ FFFFFF4E9889A998444444E9AAA8A444FFFF4E8994EA988A44444444D8A4E9994444444DE4FFFFF4 00210004545966640000004382252000212106133023955300000000556086920000000580176230 002100 Underwood Ulysses 2121 Wall Street New York NY 17623 * ......@...@.....@@@@@@.......@@@....@....@......@@@@@@@@.........@@@@@@..@.....@ FFFFFF4E894CAA89444444E898988444FFFF4E8984EA988A44444444C999AA998444444CC4FFFFF4 00220005150533550000005135995000222205955023955300000000863386664000000310987750 002200 Van Etten Valerie 2222 Vine Street Hollywood CA 98775 * ......@......@@@@@@@@@.....@@@@@....@....@......@@@@@@@@......@@@@@@@@@..@.....@ FFFFFF4E89A99444444444E898A44444FFFF4D8894EA988A44444444C9AA99444444444DC4FFFFF4 00230006932650000000006935800000232304195023955300000000262365000000000410014720 002300 Wilson Wiley 2323 Main Street Boston MA 01472 * ......@....@@@@@@@@@@@......@@@@....@....@......@@@@@@@@.........@@@@@@..@.....@ FFFFFF4E98A44444444444E8A8894444FFFF4FFEC4EA988A44444444D8A8A8998444444ED4FFFFF4 00240007918000000000007159590000242402438023955300000000512859335000000350441900 002400 Xray Xavier 2424 24TH Street Nashville TN 44190 * ......@.....@@@@@@@@@@.....@@@@@....@.....@......@@@@@@@.......@@@@@@@@..@...... FFFFFF4E9A984444444444E899844444FFFF4E99884EA988A4444444E9999A944444444DD4FCFFCF 00250008645700000000008155900000252508657502395530000000369653600000000650627416 002500 Young Yanni 2525 Yonge Street Toronto ON 6B74A6 * ......@......@@@@@@@@@.......@@@....@....@......@@@@@@@@......@@@@@@@@@..@.....@ FFFFFF4E898A8444444444E88A999444FFFF4FFEC4EA988A44444444C8998A444444444EE4FFFFF4 00260009559380000000009524365000262602638023955300000000413312000000000370719220 002600 Zenith Zebulon 2626 26TH Street Dallas TX 71922 * ......@...@@@@@@@@@@@@....@@@@@@...@....@......@@@@@@@@@........@@@@@@@..@.....@ FFFFFF4C98444444444444D989444444FFF4D8894EA988A444444444C9AA88984444444DD4FFFFF4 12345604650000000000001685000000123041950239553000000000158685950000000690881560 123456 Doe John 123 Main Street Anywhere OR 88156 * Data Output from ASCII-encoded FileThe following is an example of the HEX-Dump information for an ASCII-encoded file. 000100 Anderson Adrian 111 Peachtree Plaza Atlanta GA 26101 33333324666776622222224676662222333256666776625667622222476667622222222442333332 00010001E4523FE000000014291E0000111005138425500C1A10000014C1E4100000000710261010 ........>....?>.........../>........&./.......&%/:/.......%/>./................. * 000200 Brown Billie 222 Baker Boulevard Baltimore MD 35702 33333324767622222222224666662222333246667246766767622222466766676222222442333332 000200022F7E000000000029CC950000222021B5202F5C561240000021C49DF25000000D40357020 .........?.>............%%.........../.....?.%../......../%.._?........(........ * 000300 Carson Cameron 333 Crenshaw Blvd. Cupertino CA 96154 33333324677662222222224666766222333247667667246762222222477677666222222442333332 00030003123FE00000000031D52FE0003330325E381702C64E0000003505249EF000000310961540 ......../..?>........../_..?>..........>../...%................>?............... * 000400 Davidson Dion 444 Main Street Wilmington DE 27323 33333324676676622222224666222222333246662577667222222222566666676622222442333332 0004000416943FE000000049FE0000004440D19E034255400000000079CD9E74FE00000450273230 ......../....?>.........?>..........(/.>..................%_.>..?>.............. * 000500 Everest Evan 555 5TH Avenue New York NY 10341 33333324767677222222224766222222333235424766762222222222467256762222222452333332 0005000565253400000000561E00000055505480165E550000000000E5709F2B0000000E90103410 ......................../>.................>............+....?.........+........ * 000600 Franklin Francis 666 66TH Avenue Bedrock NY 11903 33333324766666622222224766667222333233542476676222222222466766622222222452333332 0006000621EBC9E0000000621E393000666066480165E550000000002542F3B00000000E90119030 ........./>.%.>........./>..................>...............?..........+........ * 000700 Garfunkel Gwen 777 77TH Street New York NY 16539 33333324676766662222224766222222333233542577667222222222467256762222222452333332 000700071265EB5C000000775E000000777077480342554000000000E5709F2B0000000E90165390 ......../...>..%.........>..............................+....?.........+........ * 000800 Harrison Hilary 888 88TH Street Pocatello ID 79684 33333324677676622222224666772222333233542577667222222222566676666222222442333332 0008000812293FE000000089C12900008880884803425540000000000F3145CCF000000940796840 ......../....?>.........%/.`............................&?./..%%?............... * 000900 Isley Isabel 999 99TH Avenue Indianapolis IN 38762 33333324766722222222224766662222333233542476676222222222466666676667222442333332 000900093C59000000000093125C0000999099480165E550000000009E491E10FC930009E0387620 .........%.`............/..%................>............>../>/.?%......+....... * 001000 Johnson Jamie 1010 Paradise Drive Larkspur CA 90504 33333324666766222222224666622222333325676667624767622222467677772222222442333332 0010000AF8E3FE00000000A1D9500000101000121493504296500000C12B30520000000310905040 ........?.>.?>........./_............&/./................/.....`............. * 001200 Lemond Lesley 1212 Lockwood Road Mohave Desert AZ 80303 33333324666662222222224676672222333324666766625666222222466676246767722452333332 0012000C5DFE4000000000C53C59000012120CF3B7FF402F14000000DF81650453524001A0803030 .......<._?>..........<..%.`............??...?/.......(?./............!....... * 001300 Mitchell Marlow 1313 Miller Creek Road Anywhere TX 77123 33333324676666622222224676672222333324666672476662566622467766762222222552333332 0013000D94385CC0000000D12CF7000013130D9CC5203255B02F14001E9785250000000480771230 .......(.....%%.......(/.%?..........(.%%..........?/....>`..................... * 001400 Newman Noel 1414 Park Avenue Santa Monica CA 90210 33333324676662222222224666222222333325676247667622222222566762466666222442333332 0014000E57D1E000000000EF5C00000014140012B0165E550000000031E410DFE931000310902100 .......+.._/>.........+?.%...........&/......>.........../>./.(?>../............ * 001500 Osborn Owen 1515 Center Stage Rolling Rock PA 36613 33333324766762222222224766222222333324667672576662222222566666625666222542333332 0015000F32F2E000000000F75E0000001515035E45203417500000002FCC9E702F3B000010366130 .......|..?.>.........|..>.............>....../..........?%%.>...?.....&........ * 001600 Powell Pierce PO Box 1616 Ventura CA 97712 33333325676662222222225667662222542467233332222222222222566777622222222442333332 00160000F75CC00000000009523500000F02F801616000000000000065E452100000000310977120 .......&?..%%.........&.........&|..?.....................>.../................. * 001700 Quigley Quincy 1717 Farm Hill Road Oshkosh WI 43389 33333325766667222222225766672222333324676246662566622222476667622222222542333332 00170001597C5900000000159E39000017170612D089CC02F1400000F38BF3800000000790433890 ...........%.`...........>.`........../._...%%..?/......|...?................... * 001800 Ripley Ray 1818 Alien Lane Wayout KS 55405 33333325676672222222225672222222333324666624666222222222567677222222222452333332 0018000290C590000000002190000000181801C95E0C1E5000000000719F54000000000B30554050 ..........%.`........../`.............%..>.>.........../`?.................... * 001900 Smith Sammy 1919 Carnoustie Drive Novato CA 94919 33333325667622222222225666722222333324676677766247676222467676222222222442333332 00190003D948000000000031DD90000019190312EF53495042965000EF614F000000000310949190 ........_............../__`.........../.>?..............+?./.?.................. * 002000 Tucker Taylor 2020 Sanger Lane St. Paul MN 43998 33333325766672222222225676672222333325666672466622222222572256762222222442333332 0020000453B52000000000419CF200002020031E7520C1E50000000034E0015C0000000DE0439980 ......................./`%?.........../>....>.............&/.%.......(+....... * 002100 Underwood Ulysses 2121 Wall Street New York NY 17623 33333325666776662222225677767222333325666257766722222222467256762222222452333332 00210005E4527FF40000005C933530002121071CC034255400000000E5709F2B0000000E90176230 ........>....??........%`............./%%...............+....?.........+........ * 002200 Van Etten Valerie 2222 Vine Street Hollywood CA 98775 33333325662477662222225666766222333325666257766722222222466677666222222442333332 002200061E05445E00000061C52950002222069E50342554000000008FCC97FF4000000310987750 ......../>.....>......./%..............>.................?%%`.??................ * 002300 Wilson Wiley 2323 Main Street Boston MA 01472 33333325667662222222225666722222333324666257766722222222467766222222222442333332 002300079C3FE00000000079C590000023230D19E0342554000000002F34FE000000000D10014720 .........%.?>...........%.`..........(/.>................?..?>.........(........ * 002400 Xray Xavier 2424 24TH Street Nashville TN 44190 33333325767222222222225676672222333323354257766722222222467676666222222542333332 00240008219000000000008169520000242402448034255400000000E13869CC50000004E0441900 ........./`............/................................+/....%%........+....... * 002500 Young Yanni 2525 Yonge Street Toronto ON 6B74A6 33333325676622222222225666622222333325666625776672222222567667622222222442343343 00250009F5E7000000000091EE900000252509FE75034255400000004F2FE4F00000000FE0627416 ........?.>............/>>............?>.................?.?>.?........|+....... * 002600 Zenith Zebulon 2626 26TH Street Dallas TX 71922 33333325666762222222225667666222333323354257766722222222466667222222222552333332 0026000A5E948000000000A525CFE00026260264803425540000000041CC13000000000480719220 .......!.>............!...%?>............................/%%/................... * 123456 Doe John 123 Main Street Anywhere OR 88156 33333324662222222222224666222222333246662577667222222222467766762222222452333332 12345604F5000000000000AF8E0000001230D19E03425540000000001E9785250000000F20881560 ........?..............?.>..........(/.>.................>`............|........ * CMD, Hex-Dump of ASCII/Text FileThe following sub-sections describe the CMD files used in this suite of programs. Hex-Dump of a Sequential FileThe following (HX0080W1.cmd) is an example of a Windows CMD needed to run this job and produce a file of HEX-Dump information. This CMD will also run on a Windows platform using Micro Focus COBOL. @echo OFF rem * ************************************************************************ rem * HX0080W1.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ************************************************************************ rem * rem * Text - Create a Hex-Dump of a file containing 80-byte records. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * ******************************************************************* rem * Step 1, Delete any previously created file... rem * call ..\Env1BASE set CmdName=HX0080W1 rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName% - v13.03.04" :DeleteLSEQ call SimoNOTE "Continue Prepare the environment..." set SYSUT1=%BaseLib1%\DATA\ASC1\SIMOTIME.DATA.QSAM0080.DAT set SYSUT2=%BaseLib1%\DATA\WRK1\SIMOTIME.DATA.HX0080X1.DAT if exist %SYSUT2% del %SYSUT2% rem * rem * ******************************************************************* rem * Step 2, Create the Hex-Dump file... rem * call SimoNOTE "Continue Create the Hex-Dump file..." run HX80DUMP if not exist %SYSUT2% set JobStatus=0003 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "DataTAKE is %SYSUT1%" call SimoNOTE "DataMAKE is %SYSUT2%" rem * rem * ******************************************************************* rem * :EojAok call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause Create a Test FileThe following (HX0080W8.cmd) is an example of a Windows CMD file needed to create a test file. This CMD will also run on a Windows platform using Micro Focus COBOL. @echo OFF rem * ************************************************************************ rem * HX0080W8.cmd - a Windows Command File * rem * This program is provided by SimoTime Technologies * rem * (C) Copyright 1987-2019 All Rights Reserved * rem * Web Site URL: http://www.simotime.com * rem * e-mail: helpdesk@simotime.com * rem * ************************************************************************ rem * rem * Text - Create various sequential files with 80-byte records. rem * Author - SimoTime Technologies rem * Date - January 24, 1996 rem * rem * This procedure uses the Microsoft "ECHO" command to pipe instream rem * data to an ASCII/Text file. The following terms are used. rem * rem * LSEQ - a Line Sequential File or ASCII/Text File rem * RSEQ - a Record Sequential File. This example uses a file of rem * 80-byte records that may be ASCII or EBCDIC encoded. rem * KSDS - a VSAM Key-Sequenced-Data-Set. rem * rem * 1. Use the Windows "ECHO" Create an LSEQ file to be used as input to rem * create additional files. rem * 2. Read the LSEQ file and write an RSEQ, ASCII File. rem * 3. Read the LSEQ file and write an RSEQ, EBCDIC File. rem * 4. Read the RSEQ, ASCII file and write a KSDS, ASCII File. rem * rem * ******************************************************************* rem * Step 1, Delete any previously created file... rem * call ..\Env1BASE set CmdName=HX0080W8 rem * call SimoNOTE "*******************************************************%CmdName%" call SimoNOTE "Starting JobName %CmdName% - v13.03.04" :DeleteLSEQ call SimoNOTE "Identify JobStep DeleteLSEQ" set LSEQ0080=%BaseLib1%\DATA\TXT1\LSEQ0080.txt if exist %LSEQ0080% del %LSEQ0080% rem * rem * ******************************************************************* rem * Step 2, Create a new output file. Use the "echo" command provided rem * with Microsoft Windows to pipe instream data to a new rem * ASCII/Text file. rem * :ExecuteCreateLSEQ call SimoNOTE "Identify JobStep ExecuteCreateLSEQ" rem ....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8 echo 000100 Anderson Adrian 111 Peachtree Plaza Atlanta GA 26101 >%LSEQ0080% echo 000200 Brown Billie 222 Baker Boulevard Baltimore MD 35702 >>%LSEQ0080% echo 000300 Carson Cameron 333 Crenshaw Blvd. Cupertino CA 96154 >>%LSEQ0080% echo 000400 Davidson Dion 444 Main Street Wilmington DE 27323 >>%LSEQ0080% echo 000500 Everest Evan 555 5TH Avenue New York NY 10341 >>%LSEQ0080% echo 000600 Franklin Francis 666 66TH Avenue Bedrock NY 11903 >>%LSEQ0080% echo 000700 Garfunkel Gwen 777 77TH Street New York NY 16539 >>%LSEQ0080% echo 000800 Harrison Hilary 888 88TH Street Pocatello ID 79684 >>%LSEQ0080% echo 000900 Isley Isabel 999 99TH Avenue Indianapolis IN 38762 >>%LSEQ0080% echo 001000 Johnson Jamie 1010 Paradise Drive Larkspur CA 90504 >>%LSEQ0080% echo 001100 Kemper Kelly 1111 Oak Circle Kansas City KS 55651 >>%LSEQ0080% echo 001200 Lemond Lesley 1212 Lockwood Road Mohave Desert AZ 80303 >>%LSEQ0080% echo 001300 Mitchell Marlow 1313 Miller Creek Road Anywhere TX 77123 >>%LSEQ0080% echo 001400 Newman Noel 1414 Park Avenue Santa Monica CA 90210 >>%LSEQ0080% echo 001500 Osborn Owen 1515 Center Stage Rolling Rock PA 36613 >>%LSEQ0080% echo 001600 Powell Pierce PO Box 1616 Ventura CA 97712 >>%LSEQ0080% echo 001700 Quigley Quincy 1717 Farm Hill Road Oshkosh WI 43389 >>%LSEQ0080% echo 001800 Ripley Ray 1818 Alien Lane Wayout KS 55405 >>%LSEQ0080% echo 001900 Smith Sammy 1919 Carnoustie Drive Novato CA 94919 >>%LSEQ0080% echo 002000 Tucker Taylor 2020 Sanger Lane St. Paul MN 43998 >>%LSEQ0080% echo 002100 Underwood Ulysses 2121 Wall Street New York NY 17623 >>%LSEQ0080% echo 002200 Van Etten Valerie 2222 Vine Street Hollywood CA 98775 >>%LSEQ0080% echo 002300 Wilson Wiley 2323 Main Street Boston MA 01472 >>%LSEQ0080% echo 002400 Xray Xavier 2424 24TH Street Nashville TN 44190 >>%LSEQ0080% echo 002500 Young Yanni 2525 Yonge Street Toronto ON 6B74A6>>%LSEQ0080% echo 002600 Zenith Zebulon 2626 26TH Street Dallas TX 71922 >>%LSEQ0080% echo 123456 Doe John 123 Main Street Anywhere OR 88156 >>%LSEQ0080% rem * if not exist %LSEQ0080% set JobStatus=0002 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "Produced DataSet %LSEQ0080%" rem * :ConvertLSEQtoRSEQasc rem * rem * ******************************************************************* rem * Step 3, Read the previously created Line Sequential File (LSEQ) rem * and write a Record Sequential File (RSEQ) with 80-byte, rem * ASCII-encoded records. rem * call SimoNOTE "Identify JobStep ConvertLSEQtoRSEQasc" set GETLS080=%LSEQ0080% set PUTRS080=%BaseLib1%\DATA\ASC1\SIMOTIME.DATA.QSAM0080.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALAR if not exist %PUTRS080% set JobStatus=0003 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "Produced DataSet %PUTRS080%" rem * :ConvertLSEQtoRSEQebc rem * rem * ******************************************************************* rem * Step 4, Read the previously created Line Sequential File (LSEQ) rem * and write a Record Sequential File (RSEQ) with 80-byte, rem * EBCDIC-encoded records. rem * call SimoNOTE "Identify JobStep ConvertLSEQtoRSEQebc" set GETLS080=%LSEQ0080% set PUTRS080=%BaseLib1%\DATA\EBC1\SIMOTIME.DATA.QSAM0080.DAT if exist %PUTRS080% del %PUTRS080% run CV80ALER if not exist %PUTRS080% set JobStatus=0004 if not "%JobStatus%" == "0000" goto EojNok call SimoNOTE "Produced DataSet %PUTRS080%" rem * rem * ******************************************************************* rem * :EojAok call SimoNOTE "Finished JobName %CmdName%, Job Status is %JobStatus%" goto :End :EojNok call SimoNOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%" :End call SimoNOTE "Conclude SysLog is %SYSLOG%" if not "%1" == "nopause" pause JCL MembersThe following sub-sections describe the JCL members used in this suite of programs. Hex-Dump of a Sequential FileThe following (HX0080J1.jcl) is an example of a JCL member needed to run this job and produce a file of HEX-Dump information. This job will run on a Mainframe System with ZOS or a Linux, UNIX or Windows System with Micro Focus Enterprise Developer. //HX0080J1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* HX0080J1.jcl - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Hex-Dump of Sequential file containing 80-byte records. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* Step 1, JOBSETUP will delete any previously. //* Step 2, HEXDUMP1 will produce a Hex-Dump of the merged file. //* //* This set of programs will run on a mainframe under ZOS or on a //* Windows System and Micro Focus Enterprise Server or Studio. //* //* 1. Demonstrate how to use IEFBR14 with DD statements to delete //* files that have been created by a previous execution of this //* job. //* 5. Demonstrate how to create a Hexadecimal Dump of a Sequential //* file containing 80-byte, fixed-length records. //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //JOBSETUP EXEC PGM=IEFBR14 //MK0080X1 DD DSN=SIMOTIME.DATA.MK0080X1,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Produce a Hex-Dump of the Merged file... //* //HEXDUMP1 EXEC PGM=HX80DUMP //SYSUT1 DD DSN=SIMOTIME.DATA.MK0080D1,DISP=SHR //SYSUT2 DD DSN=SIMOTIME.DATA.MK0080X1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //SYSOUT DD SYSOUT=* //* // Create a Test FileThe following (HX0080J8.jcl) is an example of a JCL member needed to create a test file. This job will run on a Mainframe System with ZOS or a Linux, UNIX or Windows System with Micro Focus Enterprise Developer. //HX0080J8 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1 //* ******************************************************************* //* HX0080J8.jcl - a JCL Member for Batch Job Processing * //* This JCL Member is provided by SimoTime Technologies * //* (C) Copyright 1987-2019 All Rights Reserved * //* Web Site URL: http://www.simotime.com * //* e-mail: helpdesk@simotime.com * //* ******************************************************************* //* //* Text - Create three Sequential Data Files on disk using IEBGENER. //* Author - SimoTime Technologies //* Date - January 24, 1996 //* //* Job step 1 will delete any previously created files. //* Job step 2 will create a new file. //* //* This set of programs will run on a mainframe under MVS or on a //* Personal Computer with Windows and Micro Focus Mainframe Express. //* //* ******************************************************************* //* Step 1 of 2, Delete any previously created file... //* //JOBSETUP EXEC PGM=IEFBR14 //MK0080D1 DD DSN=SIMOTIME.DATA.MK0080D1,DISP=(MOD,DELETE,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) //* //* ******************************************************************* //* Step 2 of 2, Create and populate a new QSAM file... //* //IEBGENS2 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //* :....1....:....2....:....3....:....4....:....5....:....6....:....7. //SYSUT1 DD * 000100 Anderson Adrian 111 Peachtree Plaza Atlanta GA 26101 000200 Brown Billie 222 Baker Boulevard Baltimore MD 35702 000300 Carson Cameron 333 Crenshaw Blvd. Cupertino CA 96154 000400 Davidson Dion 444 Main Street Wilmington DE 27323 000500 Everest Evan 555 5TH Avenue New York NY 10341 000600 Franklin Francis 666 66TH Avenue Bedrock NY 11903 000700 Garfunkel Gwen 777 77TH Street New York NY 16539 000800 Harrison Hilary 888 88TH Street Pocatello ID 79684 000900 Isley Isabel 999 99TH Avenue Indianapolis IN 38762 001000 Johnson Jamie 1010 Paradise Drive Larkspur CA 90504 001100 Kemper Kelly 1111 Oak Circle Kansas City KS 55651 001200 Lemond Lesley 1212 Lockwood Road Mohave Desert AZ 80303 001300 Mitchell Marlow 1313 Miller Creek Road Anywhere TX 77123 001400 Newman Noel 1414 Park Avenue Santa Monica CA 90210 001500 Osborn Owen 1515 Center Stage Rolling Rock PA 36613 001600 Powell Pierce PO Box 1616 Ventura CA 97712 001700 Quigley Quincy 1717 Farm Hill Road Oshkosh WI 43389 001800 Ripley Ray 1818 Alien Lane Wayout KS 55405 001900 Smith Sammy 1919 Carnoustie Drive Novato CA 94919 002000 Tucker Taylor 2020 Sanger Lane St. Paul MN 43998 002100 Underwood Ulysses 2121 Wall Street New York NY 17623 002200 Van Etten Valerie 2222 Vine Street Hollywood CA 98775 002300 Wilson Wiley 2323 Main Street Boston MA 01472 002400 Xray Xavier 2424 24TH Street Nashville TN 44190 002500 Young Yanni 2525 Yonge Street Toronto ON 6B74A6 002600 Zenith Zebulon 2626 26TH Street Dallas TX 71922 123456 Doe John 123 Main Street Anywhere OR 88156 /* //SYSUT2 DD DSN=SIMOTIME.DATA.MK0080D1, // DISP=(NEW,CATLG,DELETE), // STORCLAS=MFI, // SPACE=(TRK,5), // DCB=(RECFM=FB,LRECL=80,DSORG=PS) // COBOL Demonstration ProgramThe following (HX80DUMP.cbl) is a sample of the mainframe COBOL demonstration program that does the file I/O and calls the Hex-Formatting program to build the dump information. IDENTIFICATION DIVISION. PROGRAM-ID. HX80DUMP. AUTHOR. SIMOTIME TECHNOLOGIES. ***************************************************************** * This program was generated by SimoZAPS * * A product of SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * * * * Generation Date: 2018-10-10 Generation Time: 20:28:23:19 * * * * Record Record Key * * Function Name Organization Format Max-Min Pos-Len * * PRIMARY SYSUT1 SEQUENTIAL FIXED 00080 * * * * SECONDARY SYSUT2 SEQUENTIAL FIXED 00080 * * * * * * Translation Mode is User Defined * * * ***************************************************************** ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT SYSUT1-FILE ASSIGN TO SYSUT1 ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS SYSUT1-STATUS. SELECT SYSUT2-FILE ASSIGN TO SYSUT2 ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS SYSUT2-STATUS. ***************************************************************** DATA DIVISION. FILE SECTION. FD SYSUT1-FILE DATA RECORD IS SYSUT1-REC . 01 SYSUT1-REC. 05 SYSUT1-DATA-01 PIC X(00080). FD SYSUT2-FILE DATA RECORD IS SYSUT2-REC . 01 SYSUT2-REC. 05 SYSUT2-DATA-01 PIC X(00080). ***************************************************************** * This program was created with the SYSMASK1.TXT file as input. * * The SYSMASK1 provides for the sequential reading of the input * * file and the sequential writing of the output file. * * * * If the output file is indexed then the input file must be in * * sequence by the field that will be used to provide the key * * for the output file. This is a sequential load process. * * * * If the key field is not in sequence then refer to SYSMASK2 * * to provide for a random add or update of the indexed file. * * * * This program mask will have the ASCII/EBCDIC table inserted * * for use by the /TRANSLATE function of SimoZAPS. * * * * For more information or questions please contact SimoTime * * Technologies. The version control number is 16.01.01 * * * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** WORKING-STORAGE SECTION. 01 SIM-TITLE. 05 T1 pic X(11) value '* HX80DUMP '. 05 T2 pic X(34) value 'RSEQ/80 input to Hex Dump Output '. 05 T3 pic X(10) value ' v16.01.01'. 05 T4 pic X(24) value ' helpdesk@simotime.com'. 01 SIM-COPYRIGHT. 05 C1 pic X(11) value '* HX80DUMP '. 05 C2 pic X(32) value 'This Data File Convert Member wa'. 05 C3 pic X(32) value 's generated by SimoTime Technolo'. 05 C4 pic X(04) value 'gies'. 01 SYSUT1-STATUS. 05 SYSUT1-STATUS-L pic X. 05 SYSUT1-STATUS-R pic X. 01 SYSUT1-EOF pic X value 'N'. 01 SYSUT1-OPEN-FLAG pic X value 'C'. 01 SYSUT2-STATUS. 05 SYSUT2-STATUS-L pic X. 05 SYSUT2-STATUS-R pic X. 01 SYSUT2-EOF pic X value 'N'. 01 SYSUT2-OPEN-FLAG pic X value 'C'. 01 SYSUT1-LRECL pic 9(5) value 00080. 01 SYSUT2-LRECL pic 9(5) value 00080. 01 SYSUT1-LRECL-MAX pic 9(5) value 00080. 01 SYSUT2-LRECL-MAX pic 9(5) value 00080. ***************************************************************** * The following buffers are used to create a four-byte status * * code that may be displayed. * ***************************************************************** 01 IO-STATUS. 05 IO-STAT1 pic X. 05 IO-STAT2 pic X. 01 IO-STATUS-04. 05 IO-STATUS-0401 pic 9 value 0. 05 IO-STATUS-0403 pic 999 value 0. 01 TWO-BYTES-BINARY pic 9(4) BINARY. 01 TWO-BYTES-ALPHA redefines TWO-BYTES-BINARY. 05 TWO-BYTES-LEFT pic X. 05 TWO-BYTES-RIGHT pic X. ***************************************************************** * Message Buffer used by the Z-DISPLAY-MESSAGE-TEXT routine. * ***************************************************************** 01 MESSAGE-BUFFER. 05 MESSAGE-HEADER pic X(011) value '* HX80DUMP '. 05 MESSAGE-TEXT. 10 MESSAGE-TEXT-1 pic X(068) value SPACES. 10 MESSAGE-TEXT-2 pic X(188) value SPACES. 01 MSG-LSB pic 9(5) value 267. ***************************************************************** 01 PROGRAM-NAME pic X(8) value 'HX80DUMP'. 01 INFO-STATEMENT. 05 INFO-SHORT. 10 INFO-ID pic X(8) value 'Starting'. 10 filler pic X(2) value ', '. 10 filler pic X(34) value 'RSEQ/80 input to Hex Dump Output '. 05 filler pic X(24) value ' http://www.SimoTime.com'. 01 APPL-RESULT pic S9(9) comp. 88 APPL-AOK value 0. 88 APPL-EOF value 16. 01 WRITE-FLAG pic X value 'Y'. 01 SYSUT1-TOTAL. 05 SYSUT1-RDR pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for SYSUT1 '. 01 SYSUT2-TOTAL. 05 SYSUT2-ADD pic 9(9) value 0. 05 filler pic X(3) value ' - '. 05 filler pic X(23) value 'Line count for SYSUT2 '. ***************************************************************** * User defined working storage... * USERDATA HEX4WSUI.inc * -----------------------------------------------------------* * User INCLUDE member for WORKING STORAGE. Define the * Pass Area for calling SIMOHEX4. 01 USER-1ST pic X value 'N'. COPY PASSHEX4. * -----------------------------------------------------------* ***************************************************************** PROCEDURE DIVISION. move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move INFO-STATEMENT to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT move all '*' to MESSAGE-TEXT-1 perform Z-DISPLAY-MESSAGE-TEXT perform Z-POST-COPYRIGHT perform SYSUT1-OPEN perform SYSUT2-OPEN * USRSOJ Processing not specified... perform until SYSUT1-STATUS not = '00' perform SYSUT1-READ if SYSUT1-STATUS = '00' add 1 to SYSUT1-RDR perform BUILD-OUTPUT-RECORD if WRITE-FLAG = 'Y' perform SYSUT2-WRITE if SYSUT2-STATUS = '00' add 1 to SYSUT2-ADD end-if end-if end-if end-perform * USREOJ Processing not specified... move SYSUT1-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-TOTAL to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT if APPL-EOF move 'Complete' to INFO-ID else move 'ABENDING' to INFO-ID end-if move INFO-STATEMENT to MESSAGE-TEXT(1:79) perform Z-DISPLAY-MESSAGE-TEXT perform SYSUT2-CLOSE perform SYSUT1-CLOSE GOBACK. ***************************************************************** BUILD-OUTPUT-RECORD. * USEREXEC *INC HEX080UI.inc * * -----------------------------------------------------------* HEX080UI * User Interface to SIMOHEX4 to provide HEX Dump Information. if USER-1ST not = 'Y' move 'DUMP' to PASSHEX4-REQUEST move 'Y' to USER-1ST add 80 to ZERO giving PASSHEX4-LENGTH end-if move SYSUT1-REC to PASSHEX4-SOURCE CALL 'SIMOHEX4' USING PASSHEX4-PASS-AREA move PASSHEX4-ASCII(1:PASSHEX4-LENGTH) to SYSUT2-REC perform SYSUT2-WRITE move PASSHEX4-UPPER(1:PASSHEX4-LENGTH) to SYSUT2-REC perform SYSUT2-WRITE move PASSHEX4-LOWER(1:PASSHEX4-LENGTH) to SYSUT2-REC perform SYSUT2-WRITE move PASSHEX4-EBCDIC(1:PASSHEX4-LENGTH) to SYSUT2-REC perform SYSUT2-WRITE move '*' to SYSUT2-REC exit. * -----------------------------------------------------------* HEX080UI ***************************************************************** * I/O Routines for the INPUT File... * ***************************************************************** SYSUT1-CLOSE. add 8 to ZERO giving APPL-RESULT. close SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'CLOSE Failure with SYSUT1 ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT1-READ. read SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if SYSUT1-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if if APPL-AOK CONTINUE else if APPL-EOF move 'Y' to SYSUT1-EOF else move 'READ Failure with SYSUT1 ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if end-if exit. *---------------------------------------------------------------* SYSUT1-OPEN. add 8 to ZERO giving APPL-RESULT. open input SYSUT1-FILE if SYSUT1-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to SYSUT1-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with SYSUT1 ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT1-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * I/O Routines for the OUTPUT File... * ***************************************************************** SYSUT2-WRITE. if SYSUT2-OPEN-FLAG = 'C' perform SYSUT2-OPEN end-if write SYSUT2-REC if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else if SYSUT2-STATUS = '10' add 16 to ZERO giving APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if end-if. if APPL-AOK CONTINUE else move 'WRITE Failure with SYSUT2 ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-OPEN. add 8 to ZERO giving APPL-RESULT. open OUTPUT SYSUT2-FILE if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'O' to SYSUT2-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'OPEN Failure with SYSUT2 ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. *---------------------------------------------------------------* SYSUT2-CLOSE. add 8 to ZERO giving APPL-RESULT. close SYSUT2-FILE if SYSUT2-STATUS = '00' subtract APPL-RESULT from APPL-RESULT move 'C' to SYSUT2-OPEN-FLAG else add 12 to ZERO giving APPL-RESULT end-if if APPL-AOK CONTINUE else move 'CLOSE Failure with SYSUT2 ' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT move SYSUT2-STATUS to IO-STATUS perform Z-DISPLAY-IO-STATUS perform Z-ABEND-PROGRAM end-if exit. ***************************************************************** * The following Z-ROUTINES provide administrative functions * * for this program. * ***************************************************************** * ABEND the program, post a message to the console and issue * * a STOP RUN. * ***************************************************************** Z-ABEND-PROGRAM. if MESSAGE-TEXT not = SPACES perform Z-DISPLAY-MESSAGE-TEXT end-if move 'PROGRAM-IS-ABENDING...' to MESSAGE-TEXT perform Z-DISPLAY-MESSAGE-TEXT add 12 to ZERO giving RETURN-CODE STOP RUN. * exit. ***************************************************************** Z-CALCULATE-MESSAGE-LSB. add 267 to ZERO giving MSG-LSB perform until MSG-LSB < 80 or MESSAGE-BUFFER(MSG-LSB:1) not = SPACE if MESSAGE-BUFFER(MSG-LSB:1) = SPACE subtract 1 from MSG-LSB end-if end-perform exit. ***************************************************************** * Display CONSOLE messages... * ***************************************************************** Z-DISPLAY-MESSAGE-TEXT. perform Z-CALCULATE-MESSAGE-LSB display MESSAGE-BUFFER(1:MSG-LSB) move all SPACES to MESSAGE-TEXT exit. ***************************************************************** * Display the file status bytes. This routine will display as * * four digits. If the full two byte file status is numeric it * * will display as 00nn. If the 1st byte is a numeric nine (9) * * the second byte will be treated as a binary number and will * * display as 9nnn. * ***************************************************************** Z-DISPLAY-IO-STATUS. if IO-STATUS not NUMERIC or IO-STAT1 = '9' move IO-STAT1 to IO-STATUS-04(1:1) subtract TWO-BYTES-BINARY from TWO-BYTES-BINARY move IO-STAT2 to TWO-BYTES-RIGHT add TWO-BYTES-BINARY to ZERO giving IO-STATUS-0403 move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT else move '0000' to IO-STATUS-04 move IO-STATUS to IO-STATUS-04(3:2) move 'File Status is: nnnn' to MESSAGE-TEXT move IO-STATUS-04 to MESSAGE-TEXT(17:4) perform Z-DISPLAY-MESSAGE-TEXT end-if exit. ***************************************************************** Z-POST-COPYRIGHT. display SIM-TITLE display SIM-COPYRIGHT exit. ***************************************************************** * This program was generated by SimoZAPS * * A product of SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * * * * Generation Date: 2018-10-10 Generation Time: 20:28:23:22 * ***************************************************************** COBOL Hex-Formatting RoutineThe following (SIMOHEX4.cbl) is a sample of the mainframe COBOL Hex-Formatting program. IDENTIFICATION DIVISION. PROGRAM-ID. SIMOHEX4. AUTHOR. SIMOTIME TECHNOLOGIES. ***************************************************************** * Copyright (C) 1987-2019 SimoTime Technologies. * * * * All rights reserved. Unpublished, all rights reserved under * * copyright law and international treaty. Use of a copyright * * notice is precautionary only and does not imply publication * * or disclosure. * * * * Permission to use, copy, modify and distribute this software * * for any commercial purpose requires a fee to be paid to * * SimoTime Technologies. Once the fee is received by SimoTime * * the latest version of the software will be delivered and a * * license will be granted for use within an enterprise, * * provided the SimoTime copyright notice appear on all copies * * of the software. The SimoTime name or Logo may not be used * * in any advertising or publicity pertaining to the use of the * * software without the written permission of SimoTime * * Technologies. * * * * Permission to use, copy and modify this software for any * * non-commercial purpose and without fee is hereby granted, * * provided the SimoTime copyright notice appear on all copies * * of the software. The SimoTime name or Logo may not be used in * * any advertising or publicity pertaining to the use of the * * software without the written permission of SimoTime * * Technologies. * * * * SimoTime Technologies makes no warranty or representations * * about the suitability of the software for any purpose. It is * * provided "AS IS" without any expressed or implied warranty, * * including the implied warranties of merchantability, fitness * * for a particular purpose and non-infringement. SimoTime * * Technologies shall not be liable for any direct, indirect, * * special or consequential damages resulting from the loss of * * use, data or projects, whether in an action of contract or * * tort, arising out of or in connection with the use or * * performance of this software * * * * SimoTime Technologies * * 15 Carnoustie Drive * * Novato, CA 94949-5849 * * 415.883.6565 * * * * RESTRICTED RIGHTS LEGEND * * Use, duplication, or disclosure by the Government is subject * * to restrictions as set forth in subparagraph (c)(1)(ii) of * * the Rights in Technical Data and Computer Software clause at * * DFARS 52.227-7013 or subparagraphs (c)(1) and (2) of * * Commercial Computer Software - Restricted Rights at 48 * * CFR 52.227-19, as applicable. Contact SimoTime Technologies, * * 15 Carnoustie Drive, Novato, CA 94949-5849. * * * ***************************************************************** * This program is provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * * * ***************************************************************** * ***************************************************************** * Source Member: SIMOHEX4.CBL * Copy Files: HEXTABLE.CPY * PASSHEX4.CPY ***************************************************************** * * PASSHEX4 - Create Hexadecimal Dump information. * * * DESCRIPTION * ----------- * This program will scan the source buffer and create * HEX-Dump information plus ASCII and EBCDIC display info. * * ************ ************ * * TXTHEXJ1 * * TXTHEXE1 * * ********jcl* ********cmd* * * * * * * * ************ ************ * * IEFBR14 * * SIMOEXEC * * ********utl* ********cbl* * * * * ************************* * * * * * ************ ************ ************ * * TEXT0512 *-----* TXTHEXC1 *-----* QSAMHEXW * * *******crlf* ********cbl* *******crlf* * * * * ************ * *------call-* SIMOHEX4 * * * ********cbl* * * * ************ * * EOJ * * ************ * ***************************************************************** * * MAINTENANCE * ----------- * 1996/03/15 Simmons, Created program. * 1996/03/15 Simmons, No changes to date. * ***************************************************************** DATA DIVISION. WORKING-STORAGE SECTION. 01 FIVE-BYTES pic X(5). 01 IDX-1 pic 9(3) BINARY. 01 IDX-1R REDEFINES IDX-1. 05 IDX-1R-01 pic X. 05 IDX-1R-02 pic X. 01 IDX-2 pic 9(3) BINARY. COPY HEXTABLE. ***************************************************************** LINKAGE SECTION. COPY PASSHEX4. ***************************************************************** PROCEDURE DIVISION using PASSHEX4-PASS-AREA. add 8 to ZERO giving PASSHEX4-RESULT if PASSHEX4-LENGTH not NUMERIC add 128 to ZERO giving PASSHEX4-LENGTH end-if if PASSHEX4-LENGTH > 1024 add 128 to ZERO giving PASSHEX4-LENGTH end-if if PASSHEX4-REQUEST = 'DUMP' perform DUMP-PROCESSING else add 16 to ZERO giving PASSHEX4-RESULT end-if GOBACK. ***************************************************************** * The following routines are in alphabetical sequence. * ***************************************************************** DUMP-PROCESSING. move all SPACES to PASSHEX4-DUMP-INFO perform varying IDX-2 from 1 by 1 until IDX-2 > PASSHEX4-LENGTH add 1 to ZERO giving IDX-1 move PASSHEX4-SOURCE(IDX-2:1) to IDX-1R-02 add 1 to IDX-1 move TAB-X1(IDX-1) to FIVE-BYTES move FIVE-BYTES(1:1) to PASSHEX4-UPPER(IDX-2:1) move FIVE-BYTES(2:1) to PASSHEX4-LOWER(IDX-2:1) move FIVE-BYTES(3:1) to PASSHEX4-EBCDIC(IDX-2:1) move FIVE-BYTES(4:1) to PASSHEX4-ASCII(IDX-2:1) end-perform exit. ***************************************************************** * This example is provided by SimoTime Technologies * * Our e-mail address is: helpdesk@simotime.com * * Also, visit our Web Site at http://www.simotime.com * ***************************************************************** SummaryThe purpose of this program is to provide examples for accessing a Sequential file and creating a new Sequential file containing Hexadecimal Dump information. This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers. In the world of programming there are many ways to solve a problem. This documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration. SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact or Feedback section of this document.
Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies. SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material. Downloads and LinksThis section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection. Note: A SimoTime License is required for the items to be made available on a local system or server. Current Server or Internet AccessThe following links may be to the current server or to the Internet. Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon. Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats. Explore The File Status Return Codes that are used to interpret the results of accessing VSAM data sets and/or QSAM files. Internet Access RequiredThe following links will require an internet connect. This suite of programs and documentation is available to download for review and evaluation purposes. Other uses will require a SimoTime Software License. Link to an Evaluation zPAK Option that includes the program members, documentation and control files. A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection Explore The Micro Focus Web Site for more information about products (including Micro Focus COBOL) and services available from Micro Focus. This link requires an Internet Connection. Glossary of TermsExplore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers. Contact or FeedbackThis document was created and is maintained by SimoTime Technologies. If you have any questions, suggestions, comments or feedback please use the following contact information.
We appreciate hearing from you. Company OverviewSimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems. Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms. Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment. Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
|