What is the purpose of using SYNC in COBOL?
Can someone explain the purpose of using SYNC in COBOL?
As previously explained, sets a storage boundary - re-read the earlier explanaton.
Slack is the bytes "left over" from some field to the next boundary aligned (SYNCed) field.
To see this, suggest you create some code with various short field that are 01 levels as well as some lower levels. Look at the compiled output to see how the compiler aligns things. Then add a few more lower level field (01s are automatically aligned)) and specify SYNC and see the results.